Package org.firebirdsql.gds.ng.tz
Class TimeZoneMapping
- java.lang.Object
- 
- org.firebirdsql.gds.ng.tz.TimeZoneMapping
 
- 
 public final class TimeZoneMapping extends java.lang.ObjectMapping of Firebird time zone ids.- Since:
- 4.0
- Author:
- Mark Rotteveel
 
- 
- 
Constructor SummaryConstructors Constructor Description TimeZoneMapping()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TimeZoneMappinggetInstance()booleanisOffsetTimeZone(int timeZoneId)Determines iftimeZoneIdis an offset time zone or - possibly - a named time zone.booleanisSupportedOffsetTimezone(int timeZoneId)Determines iftimeZoneIdis an offset time zone in the range supported by Jaybird [-18:00, +18:00].java.time.ZoneIdtimeZoneById(int timeZoneId)Maps a Firebird time zone id to a suitable JavaZoneId.inttoOffsetMinutes(int timeZoneId)Return the offset in minutes for an offset time zone idinttoTimeZoneId(int offsetMinutes)Return the Firebird time zone id for an offset in minutes.inttoTimeZoneId(java.time.ZoneId zoneId)Returns the Firebird time zone id for aZoneId.inttoTimeZoneId(java.time.ZoneOffset zoneOffset)Returns the Firebird time zone id for aZoneOffset.
 
- 
- 
- 
Method Detail- 
getInstancepublic static TimeZoneMapping getInstance() 
 - 
timeZoneByIdpublic java.time.ZoneId timeZoneById(int timeZoneId) Maps a Firebird time zone id to a suitable JavaZoneId.The returned value is either a named time zone (zone region), or an offset zone ( ZoneOffset).- Parameters:
- timeZoneId- Firebird time zone id (valid between between 0 and 65535)
- Returns:
- java.time.Zoneequivalent (out of range values or unmapped ids will return- UTC).
 
 - 
isOffsetTimeZonepublic boolean isOffsetTimeZone(int timeZoneId) Determines iftimeZoneIdis an offset time zone or - possibly - a named time zone.- Parameters:
- timeZoneId- Firebird time zone id
- Returns:
- trueif this is an offset time zone,- falseotherwise
 
 - 
isSupportedOffsetTimezonepublic boolean isSupportedOffsetTimezone(int timeZoneId) Determines iftimeZoneIdis an offset time zone in the range supported by Jaybird [-18:00, +18:00].- Parameters:
- timeZoneId- Firebird time zone id
- Returns:
- trueif this is an offset time zone in the range [-18:00, +18:00]
 
 - 
toOffsetMinutespublic int toOffsetMinutes(int timeZoneId) Return the offset in minutes for an offset time zone id- Parameters:
- timeZoneId- Offset time zone id (in range [0, 2878])
- Returns:
- Offset in minutes, out of range values for timeZoneIdwill return0for UTC/GMT.
 
 - 
toTimeZoneIdpublic int toTimeZoneId(java.time.ZoneOffset zoneOffset) Returns the Firebird time zone id for aZoneOffset.- Parameters:
- zoneOffset- The zone offset
- Returns:
- Firebird time zone id
- See Also:
- toTimeZoneId(ZoneId)
 
 - 
toTimeZoneIdpublic int toTimeZoneId(java.time.ZoneId zoneId) Returns the Firebird time zone id for aZoneId.This method handles both ZoneOffsetand named regions.- Parameters:
- zoneId- The zone id
- Returns:
- Firebird time zone id
- Since:
- 4.0.1
 
 - 
toTimeZoneIdpublic int toTimeZoneId(int offsetMinutes) Return the Firebird time zone id for an offset in minutes.- Parameters:
- offsetMinutes- Offset in minutes valid range [-1439, 1439] (or [-23:59, +23:59])
- Returns:
- Time zone id encoding the specified offset, out of range values will return id for offset 0(UTC)
 
 
- 
 
-