---------------------------------------------------------------------------
Slip number -----: 22
Problem ---------: Some confusion with datetime data type and timezone
Opened by -------: rcoelho@px.com.br on 07/26/99 12:26
Assigned To -----: thomas
---------------------------------------------------------------------------
Summary:
This problem happened when a program show a datetime field in the screen, we don't change it and save(update) it. Each
time,it added 2 hours to the field, if timezone ID is present.
If datetime is out of abstime limits (1901-2037) timezone ID disappear.
psql mydb
mydb=> create table dttest(anyfield datetime);
CREATE
mydb=> insert into dttest values ('26/07/1999 12:00:00 EST');
INSERT 178665 1
mydb=> select * from dttest;
anyfield
----------------------------
Mon 26 Jul 14:00:00 1999 EST # Why 14:00:00 ?
(1 row)
mydb=> update dttest set anyfield='26/07/1999 12:00:00 EST';
UPDATE 1
mydb=> select * from dttest;
anyfield
----------------------------
Mon 26 Jul 14:00:00 1999 EST # Why 14:00:00 ?
(1 row)
mydb=> update dttest set anyfield='26/07/1999 12:00:00';
UPDATE 1
mydb=> select * from dttest;
anyfield
----------------------------
Mon 26 Jul 12:00:00 1999 EST # Why EST ?
(1 row)
mydb=> update dttest set anyfield='01/01/1950 12:00:00';
UPDATE 1
mydb=> select * from dttest;
anyfield
----------------------------
Sun 01 Jan 12:00:00 1950 EDT # Why EDT ?
(1 row)
mydb=> update dttest set anyfield='01/01/1900 12:00:00';
UPDATE 1
mydb=> select * from dttest;
anyfield
------------------------
Mon 01 Jan 12:00:00 1900 # Where is timezone ID ?
(1 row)
---------------------------------------------------------------------------
History:
07/26/99 13:14 by scrappy:
Dependency changed to 0 from
Current tech changed to thomas from
Status changed to O from U
Contact changed to from ANONYMOUS
Scheduled Close Date changed to 0 from
Scheduled Open Date changed to 0 from
Public setting changed to 1 from 0
Policy changed to 0
---------------------------------------------------------------------------
Full information on this slip is available at:
http://www.postgresql.org/bugs/visitor.php3?sid=22&v_func=zoom
---------------------------------------------------------------------------
This message was generated automatically by Keystone at http://www.postgresql.org