Re: Display of timestamp in pg_dump custom format

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Display of timestamp in pg_dump custom format
Date: 2014-09-04 00:33:31
Message-ID: 20140904003331.GH13008@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 4, 2014 at 12:02:19PM +1200, Gavin Flower wrote:
> I would prefer the date in a sane numeric format to the left of the
> time (similar to what I suggested above), easier to sort (if a sort
> is required) - it is also easier to use regular expressions to
> select statement in an arbitrary date/time range.
>
> I don't always know in advance that I need to debug something, so I
> tend to try and ensure that the relevant data is easy to find, even
> when I currently don't expect ever to do so. This is a lesson that
> I have learnt from over 40 years of commercial programming
> experience using a variety of languages on a wide range of
> platforms.
>
> Most likely, I will never need to worry about the precise format of
> Archive statement output, but ...

I can't seem to find a way to get the timezone offset via C; see:

http://stackoverflow.com/questions/635780/why-does-glibc-timezone-global-not-agree-with-system-time-on-dst

On Linux, do 'man timezone' for details. 'timezone' has the non-DST
offset from GMT, and 'daylight' is a boolean which indicates DST, but
not how much time is different for DST, and I am not sure it is always
an hour. In fact 'daylight' is documented as saying whether there is
every a daylight savings time, not that DST is active.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-09-04 00:39:37 Re: WAL format and API changes (9.5)
Previous Message Peter Geoghegan 2014-09-04 00:11:56 Re: B-tree descend for insertion locking