Class DateTimeContext
java.lang.Object
org.springframework.format.datetime.standard.DateTimeContext
A context that holds user-specific 
java.time (JSR-310) settings
 such as the user's Chronology (calendar system) and time zone.
 A null property value indicates the user has not specified a setting.
- Since:
- 4.0
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn the user's chronology (calendar system), if any.getFormatter(DateTimeFormatter formatter) Get the DateTimeFormatter with this context's settings applied to the baseformatter.Return the user's time zone, if any.voidsetChronology(Chronology chronology) Set the user's chronology (calendar system).voidsetTimeZone(ZoneId timeZone) Set the user's time zone.
- 
Constructor Details- 
DateTimeContextpublic DateTimeContext()
 
- 
- 
Method Details- 
setChronologySet the user's chronology (calendar system).
- 
getChronologyReturn the user's chronology (calendar system), if any.
- 
setTimeZoneSet the user's time zone.Alternatively, set a TimeZoneAwareLocaleContextonLocaleContextHolder. This context class will fall back to checking the locale context if no setting has been provided here.
- 
getTimeZoneReturn the user's time zone, if any.
- 
getFormatterGet the DateTimeFormatter with this context's settings applied to the baseformatter.- Parameters:
- formatter- the base formatter that establishes default formatting rules, generally context-independent
- Returns:
- the contextual DateTimeFormatter
 
 
-