Package org.netxms.client
Class TimeZoneRules
java.lang.Object
org.netxms.client.TimeZoneRules
Helper for converting Java time zone rules into POSIX TZ rule strings (the format zic writes into TZif footers, for example
EET-2EEST,M3.5.0/3,M10.5.0/4).-
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoPosixRule(ZoneId zoneId) Convert current rules of given time zone into POSIX TZ rule string.
-
Method Details
-
toPosixRule
Convert current rules of given time zone into POSIX TZ rule string. Only the currently effective rules are considered (the rules describing transitions after the last explicitly listed one), so historical changes of a zone are not reflected. Fixed-offset zones are described by their current offset (which may be a permanent daylight saving offset). Rules bound to a fixed day of month are emitted as Julian day rules (Jn), which is exact for dates after February counted from month start, but only approximate for rules counted back from the end of February (leap years shift such dates by one day).- Parameters:
zoneId- time zone- Returns:
- POSIX TZ rule string, or null if the zone cannot be expressed exactly
-