From: | Antti Haapala <antti(dot)haapala(at)iki(dot)fi> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: timestamps and dates |
Date: | 2003-04-28 21:36:14 |
Message-ID: | Pine.GSO.4.44.0304282332400.5803-100000@paju.oulu.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 28 Apr 2003, Tom Lane wrote:
> "Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
> > In answer to Tom's question in reply about B using leap second accounting, I
> > don't know. Someone here probably can say without thinking whether RH 7.0 did
> > or not.
>
> I believe this is a property of the timezone file you are using. But
> like you, I dunno what determines the default timezone when neither TZ
> nor /etc/timezone is set. Anyone?
info libc says this (in the node 'Running make install'):
To configure the locally used timezone, set the `TZ' environment
variable. The script `tzselect' helps you to select the right
value. As an example, for Germany, `tzselect' would tell you to
use `TZ='Europe/Berlin''. For a system wide installation (the
given paths are for an installation with `--prefix=/usr'), link
the timezone file which is in `/usr/share/zoneinfo' to the file
`/etc/localtime'. For Germany, you might execute `ln -s
/usr/share/zoneinfo/Europe/Berlin /etc/localtime'.
My system (Gentoo 1.4 w/ glibc 2.3.1) didn't have /etc/timezone at all. So
I did a little googling and found that it's mostly used by programs
tzconfig/tzsetup etc.
And what comes to leap second accounting, the leap seconds were introduced
in 1972 and after that only ~35 leap seconds have been added to UTC.
You could try this on your box (it *might* work):
% date +%s -d '31-dec-1998 23:59:60'
915141600
% date +%s -d '1-jan-1999 00:00:00'
915141600
If there's one second difference in numbers it implies that leap second
accounting is on in your timezone file.
BTW, I found a rather interesting page "Astronomical Time Keeping", which
contains lots of information about timezones, calendars, different UTs,
leap seconds, leap years...: http://www.maa.mhn.de/Scholar/times.html
--
Antti Haapala
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Eckermann | 2003-04-28 21:46:23 | Fwd: Re: Selecting the most recent date |
Previous Message | Ron Johnson | 2003-04-28 21:22:58 | Re: > 16TB worth of data question |