From Owen: I tried mktime on Darwin an Linux; looks like they both default to UTC if the TZ environment variable is unset but on Solaris it defaults to the local timezone. I compiled and ran the tests and checked the behaviour by running: date TZ="" date TZ="UTC" date On Solaris the first two are in local time and the third is in UTC. On Darwin and Linux the first one is in local time and the other two are in UTC. Found this as a reference, too, which mentions the suggested implementation in 'man 3 timegm': http://stackoverflow.com/questions/6467844/is-c-mktime-different-on-windows-and-gnu-linux Signed-off-by: Paul Beckingham <paul@beckingham.net>
64 KiB
64 KiB