开发者

How do you set the time in Postgres?

开发者 https://www.devze.com 2023-03-30 17:53 出处:网络
How do you set the time in Postgres?I\'ve set the time zone in Postgres to Eastern Standard Time using set timezone=\'-5\'.However, the time was 45 minutes off where it should have been.Thinking Postg

How do you set the time in Postgres? I've set the time zone in Postgres to Eastern Standard Time using set timezone='-5'. However, the time was 45 minutes off where it should have been. Thinking Postgres was getting the time from Linux, I set the date i开发者_开发百科n Linux using date -s="24 AUG 2011 13:48" and rebooted, and yet the problem persists.

Any ideas?


Postgresql will get its time (not necessarily time zone) setting from the OS, yes.

If your Linux machine has internet access, you can install NTP to keep the time in sync. Simply setting the time locally should be persisted back to the BIOS RTC, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号