|
Posted by Vin on May 21, 2007, 5:51 pm
Please log in for more thread options
Hi,
I am writing a program trying to set the time and time zone using Embedded
Visual C++ 4.0.
After I applied the time patch last march, I have been unable to set the
correct time for Pacific time zone because for Pacific, the patch added a new
time zone similar to Pacific.
For Pacific the patch added: GMT-8 Tijuana, Baja California
But Pacific on the device is also: GMT-8 Pacific US
So, when the program tries to set the time zone to Pacific, it will select
Tijuana.
So, how can I fix this? Please help me. Many Thanks!
Here is my code:
TIME_ZONE_INFORMATION tzNew = {8 * 60, L"PDT Pacific US"
,0,L"PDT Daylight Saving",,-1 * 60};
SetTimeZoneInformation(&tzNew);
SYSTEMTIME UTCTime;
UTCTime.wYear = 2007;
UTCTime.wMonth = 05;
UTCTime.wDay = 21;
UTCTime.wHour = 4;
UTCTime.wMinute = 49;
UTCTime.wMilliseconds = 0;
SetSystemTime(&UTCTime);
|