Class JacksonJodaDateFormat


  • public class JacksonJodaDateFormat
    extends Object
    Simple container used to encapsulate (some of) gory details of customizations related to date/time formatting.
    • Field Detail

      • _formatter

        protected final org.joda.time.format.DateTimeFormatter _formatter
      • _jdkTimezone

        protected final TimeZone _jdkTimezone
      • _jodaTimezone

        protected transient org.joda.time.DateTimeZone _jodaTimezone
      • _explicitTimezone

        protected final boolean _explicitTimezone
      • _adjustToContextTZOverride

        protected final Boolean _adjustToContextTZOverride
        Flag for JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE
        Since:
        2.8
      • _writeZoneId

        protected final Boolean _writeZoneId
        Flag for JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID
        Since:
        2.8
      • DEFAULT_LOCALE

        protected static final Locale DEFAULT_LOCALE
      • _useTimestamp

        protected final Boolean _useTimestamp
        Flag that indicates that serialization must be done as the Java timestamp, regardless of other settings.
      • _locale

        protected final Locale _locale
      • _explicitLocale

        protected final boolean _explicitLocale
    • Constructor Detail

      • JacksonJodaDateFormat

        public JacksonJodaDateFormat​(org.joda.time.format.DateTimeFormatter defaultFormatter)
      • JacksonJodaDateFormat

        public JacksonJodaDateFormat​(JacksonJodaDateFormat base,
                                     org.joda.time.format.DateTimeFormatter formatter)
    • Method Detail

      • withAdjustToContextTZOverride

        public JacksonJodaDateFormat withAdjustToContextTZOverride​(Boolean adjustToContextTZOverride)
        Since:
        2.8
      • getTimeZone

        public org.joda.time.DateTimeZone getTimeZone()
        Since:
        2.6
      • getLocale

        public Locale getLocale()
      • rawFormatter

        public org.joda.time.format.DateTimeFormatter rawFormatter()
      • createFormatter

        public org.joda.time.format.DateTimeFormatter createFormatter​(com.fasterxml.jackson.databind.SerializerProvider ctxt)
      • createFormatterWithLocale

        public org.joda.time.format.DateTimeFormatter createFormatterWithLocale​(com.fasterxml.jackson.databind.SerializerProvider ctxt)
      • createParser

        public org.joda.time.format.DateTimeFormatter createParser​(com.fasterxml.jackson.databind.DeserializationContext ctxt)
        Accessor used during deserialization.
      • shouldAdjustToContextTimeZone

        public boolean shouldAdjustToContextTimeZone​(com.fasterxml.jackson.databind.DeserializationContext ctxt)
        Since:
        2.8
      • shouldWriteWithZoneId

        public boolean shouldWriteWithZoneId​(com.fasterxml.jackson.databind.SerializerProvider ctxt)
        Since:
        2.8
      • isTimezoneExplicit

        public boolean isTimezoneExplicit()
        Differentiate if TimeZone is specified by caller
        Returns:
        true if TimeZone is specified by caller; false otherwise.
      • _isStyle

        protected static boolean _isStyle​(String formatStr)
      • useTimestamp

        public boolean useTimestamp​(com.fasterxml.jackson.databind.SerializerProvider provider,
                                    com.fasterxml.jackson.databind.SerializationFeature feat)