
com.thebund1st.daming.sdk.jjwt.ZonedClock Maven / Gradle / Ivy
The newest version!
package com.thebund1st.daming.sdk.jjwt;
import io.jsonwebtoken.Clock;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;
public class ZonedClock implements Clock {
//TODO make it configurable
private ZoneId zoneId = ZoneId.of("Asia/Shanghai");
@Override
public Date now() {
return Date.from(ZonedDateTime.now(zoneId).toInstant());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy