From: Michel B. <mi...@bo...> - 2005-02-19 23:04:22
|
Le Samedi 19 F=E9vrier 2005 23:09, Klaus Alexander Seistrup a =E9crit : > > Instead of using "YYYYMMDD HHMMSS" and localtime(), how about using > "YYYYMMDDTHHMMSSZ" and gmtime() for Postgres? The last_seen / first_seen fields in the tables are currently stored in=20 localtime, as "timestamp without time zone". I didn't change anything in the way this data is stored, only the way=20 intervals are calculated. When we calculate the interval, we need to use the same local time base, = or=20 the calculated intervals will be wrong. There is no special interest in using GMT here : Timestamps used in SQLgr= ey=20 only usage is to calculate durations (basically: How much time elapsed si= nce=20 an entry was added in connect ? How long since wed last saw an entry in=20 *_awl ?). Storing it as localtime seems to make more sense than using GMT= ,=20 and it's what is already done... There's little chance, if any, that the same SQLgrey DB would be used by=20 several servers on different timezones, so why use GMT...? Cheers. --=20 Michel Bouissou <mi...@bo...> OpenPGP ID 0xDDE8AC6E Tout le malheur des hommes vient de ce qu'ils ne vivent pas dans _le_ mon= de, mais dans _leur_ monde. -- H=E9raclite. |