BUG #2816: Logfile difference in timestamp between Windows and Linux

Started by Joost Kraaijeveldover 19 years ago3 messagesbugs
Jump to latest
#1Joost Kraaijeveld
J.Kraaijeveld@Askesis.nl

The following bug has been logged online:

Bug reference: 2816
Logged by: Joost Karaaijeveld
Email address: J.Kraaijeveld@Askesis.nl
PostgreSQL version: 8.1.5
Operating system: Windows 2000 / Linux Debian Etch
Description: Logfile difference in timestamp between Windows and
Linux
Details:

Printing a timestamp using '%t%' in Windows omits the timezone in the
logfile. In Linux the timezone is printed. Either make the two the same by
default or make it configurable so that the user can make them the same.

I prefer that they both print the timezone by default and do not so if
configured not to do that. I do not think that losing the timezone helps in
interpreting the log files, especially if the PostgrSQL servers are in other
timezones than the applications they serve.

The source code says that the timezone is to long to use. According to
http://msdn2.microsoft.com/en-gb/library/90s5c885(VS.80).aspx
one could use _tzname[0] to get a short versino of the TZ?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joost Kraaijeveld (#1)
Re: BUG #2816: Logfile difference in timestamp between Windows and Linux

"Joost Karaaijeveld" <J.Kraaijeveld@Askesis.nl> writes:

Printing a timestamp using '%t%' in Windows omits the timezone in the
logfile. In Linux the timezone is printed. Either make the two the same by
default or make it configurable so that the user can make them the same.

The zone name available from Windows is not only too long, but
localized, and we can't be sure that it's given in the right encoding.
So I'm afraid this isn't happening.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: BUG #2816: Logfile difference in timestamp between

Tom Lane wrote:

"Joost Karaaijeveld" <J.Kraaijeveld@Askesis.nl> writes:

Printing a timestamp using '%t%' in Windows omits the timezone in the
logfile. In Linux the timezone is printed. Either make the two the same by
default or make it configurable so that the user can make them the same.

The zone name available from Windows is not only too long, but
localized, and we can't be sure that it's given in the right encoding.
So I'm afraid this isn't happening.

Seems this was not documented, so I added a mention and backpatched to
8.2.X.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/bjm/difftext/x-diffDownload+2-2