Skip to end of metadata
Go to start of metadata

The value containing the start date/time for DaylightStart or StandardStart is stored in a common structure called SYSTEMTIME.  This structure specifies a date and time, using individual members for the month, day, year, weekday, hour, minute, second, and millisecond.  The structure is shown below:

SYSTEMTIME Structure


In our example (see Figure 1), the DaylightStart value is a REG_BINARY value containing a number of bytes.  These bytes represent the various elements of the SYSTEMTIME structure.  The WORD values are stored in Little Endian format.

 

Figure 1

 

Figure 1 shows the binary value for DaylightStart.  Each WORD from the SYSTEMTIME structure is broken down in Table 1.

 

Bytes 

Value 

Information  

Bytes 0 - 1

0x0000

Represent the year from a 1900 time base.  This is only required if the change is year specific and will normally be zero.

Bytes 2 - 3

0x0003

Represent the month; in this case the third month is March.

Bytes 4 - 5

0x0005

Represent the week (starts at 1 and 5 means last); in this case the last week.

Bytes 6 - 7

0x0003

Represents the hour; in this case 0300 hours.

Bytes 8 - 9

0x0000

Represents the minute value; in this case zero.

Bytes 10 - 11

0x0000

Represent the second value; in this case zero.

Bytes 12 - 13

0x0000

Represents the millisecond value; in this case zero.

Bytes 14 - 15

0x0001

Represents the day of the week (Sunday = 0); in this case Monday.

Table 1

 

In our scenario, Daylight Saving Time (DST) will start on Monday of the last week in March at 0300 hours.  Using the same calculation, we can calculate that Standard Time will start on Sunday of the last week in October at 0400 hours.

Labels: