Daylight or standard time

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Daylight or standard time

#1 Post by bwolfsohn »

I'm drawing a blank here...

when displaying the time, i'd like to also display whether it's daylight standard time or daylight savings time.

there's a windows function that will return that, but i have never done wrappers for that...

https://msdn.microsoft.com/en-us/librar ... 2147217396

DWORD WINAPI GetDynamicTimeZoneInformation(
_Out_ PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation
);

if it returns a 2,. it's daylight savings time, otherwise it's standard time.

does anyone have a function that handles this ?? or, can you tell me how to call it ??
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Daylight or standard time

#2 Post by Auge_Ohr »

bwolfsohn wrote:when displaying the time, i'd like to also display whether it's daylight standard time or daylight savings time.

there's a windows function that will return that, but i have never done wrappers for that...

https://msdn.microsoft.com/en-us/librar ... 2147217396

DWORD WINAPI GetDynamicTimeZoneInformation(
_Out_ PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation
);

if it returns a 2,. it's daylight savings time, otherwise it's standard time.
it is a Structure, read here https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
bwolfsohn wrote:does anyone have a function that handles this ?? or, can you tell me how to call it ??
as i remember StandardDate/DaylightDate are SYSTEMTIME Structure
(https://msdn.microsoft.com/en-us/librar ... 85%29.aspx)
it does contain Start Day / End Day of Daylightsaving.

if you just need Day, not Time Bias, you can calculate it with this
Daylight.ZIP
(409 Bytes) Downloaded 706 times
greetings by OHR
Jimmy

Post Reply