LocalTimeMsg::GetTimeAdjust

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

This method returns a value that is used to calculate the correct local time from the Universal Coordinated Time (UTC) time.

Syntax

unsigned char GetTimeAdjust();

Parameters

None.

Return Value

Returns the time-adjust value.

Remarks

The time-adjust byte (TIME_ADJUST) of the payload is an eight-bit value that contains two elements required to determine the correct local time.

The least significant five bits (bits 0 - 4) of this element specifies the time delta from UTC in hours, shifted by 12 hours. Bit 5 specifies whether to add an additional half-hour to accommodate Newfoundland and other areas. Bit 6 specifies whether to add an additional hour due to daylight saving time (DST). Bit 7 is reserved for future use.

The local time is Greenwich Mean Time (GMT) time + the time offset. The time offset can be calculated by using the following formula:

Offset = (TIME_ADJUST & 1Fh)– 0Ch + ((TIME_ADJUST & 40h) >> 6)

Plus, you must add a half hour if (TIME_ADJUST & 20h) is true.

For an example of how to write this algorithm, see LocalTimeHandler.cpp of the MSN Direct sample application.

Requirements

Header DBRLib.h
Library DBRLib.lib
Windows Embedded CE Windows CE 5.0, Windows Embedded NavReady 2009

See Also

Reference

LocalTimeMsg::GetTimeUTC
LocalTimeMsg Class
MSN Direct Services Classes