2 Jan 2004 19:18
RE: Fix for wrong internal date
Jesse Norell <jesse <at> kci.net>
2004-01-02 18:18:49 GMT
2004-01-02 18:18:49 GMT
Hello,
For those interested, to fix dates in postgres this worked for us
(postgresql 7.3.2):
update messages set internal_date = internal_date - ('1 year'::reltime)
where internal_date > now();
Jn
---- Original Message ----
From: Bret Baptist <dbmail <at> dbmail.org>
To: dbmail <at> dbmail.org
Subject: [Dbmail] Fix for wrong internal date
Sent: Tue, 30 Dec 2003 08:59:56 -0600
> This code uses the next year of this current week if the last week
of the
> year:
> strftime(timestr, sizeof(timestr), "%G-%m-%d %H:%M:%S", &tm);
>
>
> This code will always use the current year:
> strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", &tm);
>
> You need to go through the dbmail sources and change all strftime
lines to
> look like above, with a %Y, instead of a %G.
>
(Continue reading)
Thank you!
Best regards,
Igor.
RSS Feed