Package org.keycloak.models.map.common
Class TimeAdapter
java.lang.Object
org.keycloak.models.map.common.TimeAdapter
Wrapper for adapters around handling time in seconds.
Will be removed once #11053 has been implemented.
- Author:
- Alexander Schwartz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longfromIntegerWithTimeInSecondsToLongWithTimeAsInSeconds(int timestamp) Wrapper to all upgrading from an Integer to a Long while Keycloak core still handles all time seconds since 1970 as seconds as integers.static intWrapper to all unsafe downgrading from a Long to an Integer while Keycloak core still handles all time since 1970 as seconds as integers.static LongfromMilliSecondsToSeconds(Long milliSeconds) static LongfromSecondsToMilliseconds(int seconds) static LongfromSecondsToMilliseconds(Long seconds)
-
Constructor Details
-
TimeAdapter
public TimeAdapter()
-
-
Method Details
-
fromLongWithTimeInSecondsToIntegerWithTimeInSeconds
Wrapper to all unsafe downgrading from a Long to an Integer while Keycloak core still handles all time since 1970 as seconds as integers. This is safer to use than downgrading in several places as that might be missed once the Core starts to use longs as timestamps as well. Simplify/remove once #11053 has been implemented. -
fromIntegerWithTimeInSecondsToLongWithTimeAsInSeconds
public static long fromIntegerWithTimeInSecondsToLongWithTimeAsInSeconds(int timestamp) Wrapper to all upgrading from an Integer to a Long while Keycloak core still handles all time seconds since 1970 as seconds as integers. This is safer to use and remove once the Core starts to use longs as timestamps as well. Simplify/remove once #11053 has been implemented. -
fromSecondsToMilliseconds
-
fromMilliSecondsToSeconds
-
fromSecondsToMilliseconds
-