localtime ?

From: James Cloos <cloos(at)jhcloos(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: localtime ?
Date: 2015-06-11 22:39:26
Message-ID: m3616t3m5d.fsf@carbon.jhcloos.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)jhcloos(dot)com> OpenPGP: 0x997A9F17ED7DAEA6

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-06-11 22:50:18 Re: localtime ?
Previous Message Keith Rarick 2015-06-11 21:52:19 Re: Alter column from text[] to uuid[]