gp_mktime() For New Daylight Saving Time law (or just call mktime() everywhere if that is possible)
(Doc ID 777443.1)
Last updated on OCTOBER 23, 2023
Applies to:Oracle Tuxedo - Version 6.5 to 9.0
Information in this document applies to any platform.
Information in this document applies to any platform
Starting in 2007, Daylight Saving Time in the US will be observed from 2AM on the 2nd Sunday in March through 2AM on the 1st Sunday in November. This is a change to the law in effect since 1987, when Daylight Saving Time has been in effect from 2AM on the 1st Sunday in April through 2AM on the last Sunday in October. The function gp_mktime() calls mktime() on all currently supported Unix and Linux platforms, but on Windows BEA implement their own time conversion code by defining _TMNOMKTIME. (For some Unix/Linux platforms, _TMNOMKTIME is defined if the system does not support the 1989 C Standard, but that is no longer true on any platform you compile on.) Whatever problem existed on Windows in the distant past appears to no longer exist, and the OS mktime() now returns the number of seconds since 00:00:00 UTC 1/1/1970 just as Unix does. Furthermore, the OS mktime() on Windows is superior to gp_mktime(), since the OS mktime() gets the time zone from the OS even if TZ is not set, while gp_mktime() operates using Greenwich Mean Time unless TZ is set, which usually isn't the case on Windows.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document