Today I Learned

hashrocket A Hashrocket project

Configure The Timezone

In postgres, running show timezone; will reveal the timezone for your connection. If you want to change the timezone for the duration of the connection, you can run something like

> set timezone='America/New_York';
> show timezone;
(1 row)

Now, if you run a command such as select now();, the time will be in Eastern time.

h/t Jack Christensen

See More #sql TILs
Looking for help? Hashrocket developers believe that data quality is as important as code quality. We enjoy all the challenges of relational databases, from finding the fastest index, to structuring data to fit the needs of an application. We're eager to share our experiences; check out PG Casts, our series of free PostgreSQL screencasts.