Monthly Archives: February 2016

SQL – From timestamptz A to timestamptz B

For PostgreSQL (tested on 9.4) CREATE TABLE tests(id serial not null, created_on timestamptz); INSERT INTO tests (created_on) VALUES (now()); 2016-02-16 19:26:13.823126-05 I guess you have configured your timezone in your postgresql.conf file. I have for information ‘America/Toronto’. SELECT created_on  AT … Continue reading

Posted in Database, SQL | Leave a comment