Package org.keycloak.models.map.common
Class TimeAdapter
- java.lang.Object
-
- org.keycloak.models.map.common.TimeAdapter
-
-
Constructor Summary
Constructors Constructor Description TimeAdapter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static int
fromLongWithTimeInSecondsToIntegerWithTimeInSeconds(Long timestamp)
Wrapper to all unsafe downgrading from a Long to an Integer while Keycloak core still handles all time since 1970 as seconds as integers.static Long
fromMilliSecondsToSeconds(Long milliSeconds)
static Long
fromSecondsToMilliseconds(int seconds)
static Long
fromSecondsToMilliseconds(Long seconds)
-
-
-
Method Detail
-
fromLongWithTimeInSecondsToIntegerWithTimeInSeconds
public static int fromLongWithTimeInSecondsToIntegerWithTimeInSeconds(Long timestamp)
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
public static Long fromSecondsToMilliseconds(int seconds)
-
-