weAut_01 / weAutSys    R 2.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Fields
dst_rule_year_t Struct Reference

Data Fields

uint8_t firstSunNovember
 Day in month of first Sunday in November.
uint32_t firstSunNovember0200offset
 Number of seconds from March 1st to first Sunday in November 02:00.
uint8_t lastSunMarch
 Day in month of last Sunday in March.
uint32_t lastSunMarch0100offset
 Number of seconds from March 1st to last Sunday in March 01:00.
uint8_t lastSunOctober
 Day in month of last Sunday in October.
uint32_t lastSunOctober0100offset
 Number of seconds from March 1st to last Sunday in October 01:00.
uint8_t secondSunMarch
 Day in month of second Sunday in March.
uint32_t secondSunMarch0200offset
 Number of seconds from March 1st to second Sunday in March 02:00.

Detailed Description

Rule structure: DST rules for a given (set of) year(s)

This type represents the daylight-saving time rules by a set of values needed by the the DST handling functions. The rules represented by a structure of this type support the EU and US DST rules.

The current (as of 2012) EU and US rules are made available for the years 2000 .. 2255. This will be longer than weAutSys may be used and especially longer than politicians will stick to the current EU and US rules.

Note: The statements (last "Sunday in ..") of the rules supplied will, of course, hold — but the DST laws will probably change.

As all dates and offsets for US and EU rules given here are after March 1st or are relative to this date the values will not be affected by leap day (February 29th). Hence (non regarding the infernal leap seconds) there are just 7 different sets of rules resp. rule structures numbered 0 .. 6. This rule number may be obtained by lastSunMarch - 25 i.e. (first byte of structure) - 25.

See also:
getDSTrule()

Field Documentation

uint8_t lastSunMarch

Day in month of last Sunday in March.

For the set of years for which this rule is valid this will give the last Sunday in March. This is when EU switches DST on at 01:00 UTC, by turning the local times 1 hour ahead.

range: 25 .. 31

uint8_t lastSunOctober

Day in month of last Sunday in October.

For the set of years for which this rule is valid this will give the last Sunday in October. This is when EU switches DST off at 01:00 UTC, by turning the local times 1 hour back to normal. This will repeat the local time 02:00,000 .. 02:59,999 in CET, for example.

range: 25 .. 31

Number of seconds from March 1st to last Sunday in March 01:00.

This is the number of seconds from March 1st 00:00 to last Sunday in March 01:00. This value supports the exact timing of EU switching DST on.

Number of seconds from March 1st to last Sunday in October 01:00.

This is the number of seconds from March 1st 00:00 to last Sunday in October 01:00. This value supports the exact timing of EU switching DST off.

uint8_t secondSunMarch

Day in month of second Sunday in March.

For the set of years for which this rule is valid this will give the second Sunday in March. This is when most of the United States of America, Canada and Mexico switch DST on at 02:00 (AM) local timeTC, by turning the local times 1 hour ahead.

range: 8 .. 14

Day in month of first Sunday in November.

For the set of years for which this rule is valid this will give the first Sunday in November. This is when most Northern America witches DST off at 02:00 (AM).

range: 1..7

Number of seconds from March 1st to second Sunday in March 02:00.

This is the number of seconds from March 1st 00:00 to second Sunday in March 02:00. This value supports the exact timing of US etc. switching DST on.

Number of seconds from March 1st to first Sunday in November 02:00.

This is the number of seconds from March 1st 00:00 to first Sunday in November 02:00. This value supports the exact timing of US etc. switching DST off.


The documentation for this struct was generated from the following file: