I’ve always found working with time zones to be a bit confusing. Here is a simple way to convert from UTC to any time zone.
Query without conversion:
select id, remote_ip, device_type, platform, created_at from visitors where autovist_url_id = 25032;
Query with conversion:
select id, remote_ip, device_type, platform, (created_at at time zone 'UTC') at time zone 'EST' as created_at from visitors where autovist_url_id = 25032;
Founder, VaxCalc Labs and creator of Autovist and the Vaccine Ingredients Calculator.
Latest posts by Chris Downey (see all)
- Activist best practice: auto-archiving web pages - February 4, 2017
- Pre-calculating vaccine ingredients: from PostgreSQL to HTML data-* - February 1, 2017
- Experimental features: randomized slowdowns + retweet chains - January 31, 2017