localtime ? - Mailing list pgsql-general

From James Cloos
Subject localtime ?
Date
Msg-id m3616t3m5d.fsf@carbon.jhcloos.org
Whole thread Raw
Responses Re: localtime ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On one of my servers, even thopugh everything is in UTC, pg insists on
using timezone -04 by default.

Eg:

,----
| :; date
| Thu Jun 11 22:31:51 UTC 2015
|
| :; psql
| psql (9.4.3, server 9.3.4)
| Type "help" for help.
|
| cloos=# SELECT current_setting('TIMEZONE');
|  current_setting
| -----------------
|  localtime
| (1 row)
|
| cloos=# select now();
|               now
| -------------------------------
|  2015-06-11 18:31:55.597289-04
| (1 row)
`----

But:

,----
| :; grep timezone /etc/postgresql/9.3/main/*
| /etc/postgresql/9.3/main/postgresql.conf:log_timezone = 'UTC'
| /etc/postgresql/9.3/main/postgresql.conf:timezone = 'UTC'
| /etc/postgresql/9.3/main/postgresql.conf:#timezone_abbreviations = 'Default'     # Select the set of available time
zone
| /etc/postgresql/9.3/main/postgresql.conf:                                       # share/timezonesets/.
`----

So how do I convince it always to use utc?

(I did that test w/ ~/.psqlrc moved out of the way, but it does nothing
related to tz.)

Thanks.

-JimC
--
James Cloos <cloos@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6

pgsql-general by date:

Previous
From: Asif Naeem
Date:
Subject: Re: GCC error and libmpfr.so.4 not found
Next
From: Tom Lane
Date:
Subject: Re: localtime ?