UserCurrentSessionTimeZoneHolder
Stores the user’s current ZoneId with session scope.
eg. on application login
API
UserCurrentSessionTimeZoneHolder.java
interface UserCurrentSessionTimeZoneHolder {
void setUserTimeZone(ZoneId zoneId) (1)
Optional<ZoneId> getUserTimeZone() (2)
void clearUserTimeZone() (3)
}
1 | setUserTimeZone(ZoneId)
Sets the user’s current ZoneId within the context of the current session. |
2 | getUserTimeZone()
Optionally returns the user’s current ZoneId , based on whether it was set before, within the context of the current session. |
3 | clearUserTimeZone()
Clears the user’s current ZoneId within the context of the current session. |