Created
March 29, 2019 10:19
-
-
Save AlexBaitov/fb4d0312f8c49b79220139dde3908925 to your computer and use it in GitHub Desktop.
Postgresql timezone manipulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- https://www.postgresql.org/docs/9.6/view-pg-timezone-names.html | |
| db=> select * from pg_timezone_names; | |
| db=> begin; | |
| BEGIN | |
| db=> select now(); | |
| now | |
| ------------------------------ | |
| 2019-03-29 10:16:19.87445+00 | |
| (1 row) | |
| db=> set timezone='Asia/Novosibirsk'; | |
| SET | |
| db=> select now(); | |
| now | |
| ------------------------------ | |
| 2019-03-29 17:16:19.87445+07 | |
| (1 row) | |
| db=> show timezone; | |
| TimeZone | |
| ------------------ | |
| Asia/Novosibirsk | |
| (1 row) | |
| db=> rollback ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment