Will changing the server date/time cause problems?

Started by Justin Pasheralmost 20 years ago2 messagesgeneral
Jump to latest
#1Justin Pasher
justinp@newmediagateway.com

A client of ours has requested that we change the time on the server to
match their time zone (one hour ahead of us). Are there any know issues
or gotchas to look out for when bumping the server time forward an hour?
I couldn't imagine any issues occurring, since it's really just like the
server when 1 hour without performing any activity. Obviously any fields
in the database stored with a time without a timezone would be off
afterwards, but that's not a huge concern.

Another client has requested the same thing, but their time is two hours
behind us. This is the change that I'm more worried about, since you are
going to have some data/time overlap on the server after the change is
made. Are there any known issues with this situation in Postgres? Should
everything be shutdown prior to the change, then restarted again?

Thanks.

Justin Pasher

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Justin Pasher (#1)
Re: Will changing the server date/time cause problems?

Justin Pasher <justinp@newmediagateway.com> writes:

A client of ours has requested that we change the time on the server to
match their time zone (one hour ahead of us). Are there any know issues
or gotchas to look out for when bumping the server time forward an hour?
I couldn't imagine any issues occurring, since it's really just like the
server when 1 hour without performing any activity. Obviously any fields
in the database stored with a time without a timezone would be off
afterwards, but that's not a huge concern.

Another client has requested the same thing, but their time is two hours
behind us. This is the change that I'm more worried about, since you are
going to have some data/time overlap on the server after the change is
made. Are there any known issues with this situation in Postgres? Should
everything be shutdown prior to the change, then restarted again?

There shouldn't be any need to change the server's clock at all, at
least not if you are running a sane operating system that keeps the
underlying time in GMT. What you should be doing is setting the default
value of PG's TimeZone parameter to match what these clients want.
Or suggest to them that they set it themselves on a per-session or
per-user basis.

regards, tom lane