Please suggest the easiest way to know if it’s DST or not.
Is there a flag or something (in QNX4) that would signify that local time has changed to summer|winter rule?
Tony.
Please suggest the easiest way to know if it’s DST or not.
Is there a flag or something (in QNX4) that would signify that local time has changed to summer|winter rule?
Tony.
There is a field in the “struct tm” structure that will tell you. See the
documentation for the function “localtime()”.
“Tony” <mts.spb.suxx@mail.ru> wrote in message
news:opsdl7ibaho93ri4@mobile…
Please suggest the easiest way to know if it’s DST or not.
Is there a flag or something (in QNX4) that would signify that local time
has changed to summer|winter rule?Tony.
Yes, the field name is ‘tm_isdst’, and it is basically used as a boolean
value. It’s also all tied to what your TZ environment var is set to.
If you’re trying to set time via mktime(), set tm.tm_isdst=-1 and the
library will figure out dst. Just be aware that when converting local
time to UTC for the transitioning hour of standard to/from DST in the
spring and fall, the input is ambiguous unless tm_isdst is explicitly
set to 0 or 1 i.e. “Spring DST = Sun Apr 04 02:00:00 2004” is ambiguous,
adding cst or cdt makes it unambiguous.
-Rob
Kevin Miller wrote:
There is a field in the “struct tm” structure that will tell you. See the
documentation for the function “localtime()”.“Tony” <> mts.spb.suxx@mail.ru> > wrote in message
news:opsdl7ibaho93ri4@mobile…Please suggest the easiest way to know if it’s DST or not.
Is there a flag or something (in QNX4) that would signify that local time
has changed to summer|winter rule?Tony.