Skip to content

Commit

Permalink
Merge pull request #35 from giacgbj/main
Browse files Browse the repository at this point in the history
Platform agnostic getIssuedAt (#34)
  • Loading branch information
mmariuzzo authored Oct 30, 2024
2 parents 1e5c095 + 154e75c commit b73cd1c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.Instant;

import org.json.JSONArray;
import org.json.JSONObject;
Expand Down Expand Up @@ -165,7 +164,7 @@ public static JWK getFirstJWK(JWKSet jwkSet) throws OIDCException {
* @return current UTC date time as epoch seconds
*/
public static long getIssuedAt() {
return LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
return Instant.now().getEpochSecond();
}

/**
Expand Down

0 comments on commit b73cd1c

Please sign in to comment.