What version of the database and jdbc driver are you using? This should be fixed and work correctly in current sources. thanks, --Barry Raymond Chui wrote: > My system time zone (TZ) is set to US Eastern Standard Time is -5 hours > of > GMT time > > I set > export PGTZ=GMT > then go to psql do > > insert into a_table (a_column) values ('2001-02-08 18:30:00+00'); > select a_column from a_table; > > will get result exactly what I inserted > 2001-02-08 18:30:00+00 > > But when I used JDBC drive from org.postgresql.Driver to insert the same > value, > I got > > 2001-02-08 23:30:00+00 > > This is the value of GMT time at 18:30 of EST time! Which tell me > the Postgres JDBC drive insert the value in EST time. Why is that? > > I already did > Properties p = new Properties(); > p.put("PGTZ", "GMT"); > before connect to PostgreSQL server, but no luck! > > Can someone out there tell me how to make PostgreSQL JDBC drive > get PGTZ environment variable effect? > > Thank you very much in advance! > > --Raymond