Skip to content

Commit 154e75c

Browse files
committed
Platform agnostic getIssuedAt (#34)
Signed-off-by: Giacomo Boccardo <gboccard@gmail.com>
1 parent 1e5c095 commit 154e75c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

starter-kit/src/main/java/it/spid/cie/oidc/helper/JWTHelper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
import java.security.PrivateKey;
2222
import java.security.interfaces.RSAPublicKey;
2323
import java.text.ParseException;
24-
import java.time.LocalDateTime;
25-
import java.time.ZoneOffset;
24+
import java.time.Instant;
2625

2726
import org.json.JSONArray;
2827
import org.json.JSONObject;
@@ -165,7 +164,7 @@ public static JWK getFirstJWK(JWKSet jwkSet) throws OIDCException {
165164
* @return current UTC date time as epoch seconds
166165
*/
167166
public static long getIssuedAt() {
168-
return LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
167+
return Instant.now().getEpochSecond();
169168
}
170169

171170
/**

0 commit comments

Comments
 (0)