A month ago, I discussed the strfmt() function
. A timely announcement from Microsoft
has inspired me to write a column about a related topic, namely accessing the system's Daylight Saving Time information programmatically. This article shows how to detect whether DST is in effect in the current local time zone.
How can you detect whether DST is in effect in your current local time zone? How do you detect the difference between the local standard time and the local alternate time?
Use the _tzset(), _daylight, _timezone, and _tzname facilities of the standard <ctime> library.