I need to detect in my program if the DST is active.
Is it posible to do this in PB?
Have looked into the forum but with no results.
Appreciate any help
Daylight Saving Time
Daylight Saving Time
OS X 10.10.5 PB 5.31(x64)
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: Daylight Saving Time
Code: Select all
EnableExplicit
Define TIME_ZONE_INFORMATION.TIME_ZONE_INFORMATION
Select GetTimeZoneInformation_(TIME_ZONE_INFORMATION)
Case #TIME_ZONE_ID_UNKNOWN
Debug "Daylight saving time is not used in the current time zone, because there are no transition dates or automatic adjustment for daylight saving time is disabled."
Case #TIME_ZONE_ID_STANDARD
Debug "The system is operating in the range covered by the StandardDate member of the TIME_ZONE_INFORMATION structure. "
Case #TIME_ZONE_ID_DAYLIGHT
Debug "The system is operating in the range covered by the DaylightDate member of the TIME_ZONE_INFORMATION structure."
EndSelect
\\Edit:
Oh, I'm sorry. You are using MacOS.
I don't know but you can read this sites:
https://developer.apple.com/reference/f ... n/timezone
https://developer.apple.com/reference/f ... transition
Re: Daylight Saving Time
A few days ago I added a code for it, which would have to work on Windows, Linux and Mac:
https://github.com/SicroAtGIT/PureBasic ... ngTime.pbi
I think this thread is a duplicate of:
GetTimeZoneInformation_
https://github.com/SicroAtGIT/PureBasic ... ngTime.pbi
I think this thread is a duplicate of:
GetTimeZoneInformation_
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version