472,805 Members | 1,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Timestamp with Timezone

I recently upgraded an application from postgresql 7.4.2 to 7.4.5, and now I am having timezone nightmares.

I checked on the old server, and found that in the postgresql.conf, the timezone was set for unknown. The timezone portion of the records was being set to GMT+06 ( for reference, I am in GMT-06 ). Now, on the old server, wheni pulled data, the dates came back correctly.

However, on the new server, I am getting dates that adjust properly for thetimezone in the record, which means that my records show as having been entered a day before, which is killing my users. Can someone help me understand the timezone nightmare, and how i can fix my records so that they appearon the correct day?

I am using the exact same jdbc library to connect to both servers, and my setup is:

OLD Setup
Redhat 9
Postgres 7.4.2 (compiled from source)

NEW Setup
Redhat 3 Enterprise
Postgres 7.4.5 (compiled from source)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
1 2277
"Chris M. Gamble" <ch**********@cpbinc.com> writes:
I checked on the old server, and found that in the postgresql.conf,
the timezone was set for unknown.

Which would mean "use the system-wide timezone setting". I suspect you
have the new server configured with a different system-wide setting.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Craig Bailey | last post by:
I have several scripts that send email using PHP's mail() function. I recently noticed that the time sent displayed inside those messages is approximately one hour ahead of the actual time. (It's...
by: Will Trillich | last post by:
not sure what it's supposed to look like, but i'm reasonably sure 'show time zone' shouldn't produce this-- db=# set timezone = '-6'; SET db=# show timezone; TimeZone ----------------...
by: mboes | last post by:
Hi there, Is there a way of specifying the precision of a timestamp *with timezone* field? It works fine for timestamps *without* timezones, but gives me a syntax error if I try with...
by: David Garamond | last post by:
When a timestamp string input contains a timezone abbreviation (CDT, PST, etc), which timezone offset is used? The input date's or today date's? The result on my computer suggests the latter. #...
by: Scott Nixon | last post by:
New to Postgres 7.3 from 7.0. Am having some trouble with a query that worked in 7.0 but not in 7.3.....can't seem to figure out the syntax or find info about how to do this anywhere. ...
by: Chris Burnley | last post by:
We're seeing very strange behaviour with db2 under heavy load. We're running our system in GMT and the timezone never changes for British Summer Time. Basically the thing we're doing is (using...
by: James | last post by:
I am attempting to write a statement for inserting a current timestamp into a MySQL database. The MySQL field is of type datetime. The statement I first tried to generate a value for the field...
by: Damir | last post by:
I have a situation on a DB server where the "current timestamp" command shows the actual system time offset by one hour, which has never been noticed before?!? The DB2 is V9.1 (FP03), running on...
by: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?= | last post by:
I have an application that uses CDO to send an email alert to management when certain events occur. The messages alway have the wrong time. It appears the time is UTC. The computer date and time...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.