How to set time in Postgres? I set Postgres time zone to Eastern Standard Time using set timezone='-5' . However, the time was 45 minutes, where it should have been. Postgres thinking was getting time from Linux, I set the date on Linux using date -s="24 AUG 2011 13:48" and rebooted, but the problem still persists.
set timezone='-5'
date -s="24 AUG 2011 13:48"
Any ideas?
Postgresql will get its time (not necessarily the time zone) from the OS, yes.
If your Linux computer has Internet access, you can install NTP to synchronize the time. Just setting the time locally should be saved back to the RTC BIOS.