Project

General

Profile

« Previous | Next » 

Revision 847d8b7c

Added by Nathan Scott over 15 years ago

  • ID 847d8b7c1171bcab897333aae2617a0cd6da7fe9

Sort out widespread timezone problems under Windows.

We now use the native Win32 API to extract the timezone. This is
a Windows timezone, we want the POSIX style but there's no API,
really. What we've found works, is the same approach the MSYS
dll takes - we set TZ their way (below) and then use tzset, then
extract. Note that the %Z and %z strftime parameters do not
contain abbreviated names/offsets (they both contain Windows
timezone, and both are the same with no TZ). Note also that
putting the Windows name into the environment as TZ does not
do anything good (see the tzset MSDN docs).

Resolves a pmchart bug reported by Nigel Donaldson, where pmchart
(via __pmTimezone) was forcing TZ in the environment to something
that was never going to work so Windows always ended up with GMT.

  • added
  • modified
  • copied
  • renamed
  • deleted