Title: Re: Request for next QB64 Release, Time Zone information
Post by: Petr on March 28, 2020, 11:08:20 am
Hi EricE, no. This is not pointer to this structure, but parameter (a as INTEGER) return your time shift in minutes. You can try it, if you set other time zone in time settings in Windows.
Title: Re: Request for next QB64 Release, Time Zone information
Post by: EricE on March 28, 2020, 03:58:20 pm
Here is a program for calling GetTimeZoneInformation with an INTEGER parameter.
My location is on Pacific Time (UTC-7), so the correct time zone for me should be -7.
Title: Re: Request for next QB64 Release, Time Zone information
Post by: EricE on March 28, 2020, 04:57:49 pm
Here is a QB64 program that calls the GetTimeZoneInformation function in a way according to the Microsoft API documentation. The output of the program for my location gives a value of -60 for the DayloghtBias, and using that value to adjust the Bias value of 480 gives the correct value for my local time zone.
time zone = (480-60)/(-60) = -7
Why does Petr's program give the correct value for the time zone bias (for my computer 480) when the GetTimeZoneInformation function is called differently from the way the Microsoft documentation indicates? It should not work, but it does.
Title: Re: Request for next QB64 Release, Time Zone information
Post by: Petr on March 28, 2020, 05:22:09 pm
Thank you for the information, in fact, you are the first, which test this with me. :)
Title: Re: Request for next QB64 Release, Time Zone information
Post by: EricE on March 28, 2020, 05:56:45 pm
Petr,
I have started a new thread regarding the GetTimeZoneInformation function. It is important we understand as it involves how to call a Win32 API function.