spring-framework / org.springframework.format.datetime.standard / DateTimeContext / setTimeZone

setTimeZone

open fun setTimeZone(@Nullable timeZone: ZoneId): Unit

Set the user's time zone.

Alternatively, set a TimeZoneAwareLocaleContext on LocaleContextHolder. This context class will fall back to checking the locale context if no setting has been provided here.

See Also
org.springframework.context.i18n.LocaleContextHolder#getTimeZone()org.springframework.context.i18n.LocaleContextHolder#setLocaleContext