Sometimes a time zone with DST will use a different syntax to specify a DST start or stop day, versus the “Nth weekday” syntax shown in the previous timezones.xml example.
For example, the Baghdad time zone defintion uses day (“Exact day”) instead of “Nth weekday” to specify a particular date, in this case for the 1st of the month:
<zone id="Asia/Baghdad" utcOffset="3h"> <display name="Arabia Standard Time" short="AST" dstName="Arabia Daylight Time" dstShort="ADT"/> <dst savings="1h"> <start time="3:00 standard" month="april" day="1"/> <end time="3:00 standard" month="october" day="1"/> </dst> </zone>
A variation is where weekday and day are both used (but not week) and the day numeric value includes trailing ... to indicate “on or after (that day number),” as in time zone definition below. In this case, start time is evaluated as “on
the Friday on or after the 26th of March.”
<zone id="Asia/Tel_Aviv" utcOffset="2h"> <display name="Israel Standard Time" short="IST" dstName="Israel Daylight Time" dstShort="IDT"/> <dst savings="1h"> <start time="2:00" weekday="friday" month="march" day="26..."/> <end time="2:00" month="september" day="13"/> </dst> </zone>
A similar “on or before” variation can be specified using a leading ... before a day number, for example, day=”...12”. Of course many time zones do not even observe DST, so their definitions are noticeably shorter, for example the following
one for Honolulu:
<zone id="Pacific/Honolulu" utcOffset="-10h"> <display name="Hawaii Standard Time" short="HST"/> </zone>
Copyright © 2000-2014 Tridium Inc. All rights reserved.