Skip to content

timezone is not supported in digital signs #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sign/src/main/java/com/itextpdf/signatures/SignUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ static X509Principal getIssuerX509Name(ASN1Sequence issuerAndSerialNumber) throw
}

public static String dateToString(Calendar signDate) {
return new SimpleDateFormat("yyyy.MM.dd HH:mm:ss z").format(signDate.getTime());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss z");
if(signDate.getTimeZone() != null) sdf.setTimeZone(signDate.getTimeZone());
return sdf.format(signDate.getTime());
}

static class TsaResponse {
Expand Down