jpick
asked on
Setting Daylight Savings Flag
I have some code to set the time & timezone on my machine. To do this I use the SetLocalTime and SetTimezoneInformation methods. What I can't seem to do is find a way to set the daylight savings flag on or off. Can someone please let me know how to do this? I'm guessing its just a matter of setting the correct information in the SYSTEMTIME struct I use when calling SetTimezoneInformation?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please update and finalize this old, open question. Please:
1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.
EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.
Thanks,
** Mindphaser - Community Support Moderator **
P.S. Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.
EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.
Thanks,
** Mindphaser - Community Support Moderator **
P.S. Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
ASKER
Although this is not the answer I was looking for, I will give nick the points.
Have you played with the Bias member of TIME_ZONE_INFORMATION?
I'd assume "Coordinated Universal Time (UTC)" to mean GMT. You may then choose to have an enumerated type or map<string,LONG> for various timezones around the world. If you double click the clock on the Windows toolbar that'll get you started with a few offsets. I won't guarantee that this is a full list - I'm sure I remember the timezone being off by 15 minutes somewhere - though I could be wrong - I'm sure they would have complained to MS... (but then, hasn't everybody :-) )
I'd assume "Coordinated Universal Time (UTC)" to mean GMT. You may then choose to have an enumerated type or map<string,LONG> for various timezones around the world. If you double click the clock on the Windows toolbar that'll get you started with a few offsets. I won't guarantee that this is a full list - I'm sure I remember the timezone being off by 15 minutes somewhere - though I could be wrong - I'm sure they would have complained to MS... (but then, hasn't everybody :-) )
ASKER