Re: [postgresql-it] Cambio locale ?

  • From: Luca Ferrari <fluca1978@xxxxxxxxxxx>
  • To: postgresql-it <postgresql-it@xxxxxxxxxxxxx>
  • Date: Mon, 11 Dec 2017 17:39:58 +0100

2017-12-09 13:02 GMT+01:00  <acheriom@xxxxxxxxx>:

Per esempio, la data/ora 05/12/2017 21:30:13 viene memorizzata nel DB come
12/05/2017 1:30PM, in sostanza viene cambiato il formato e viene cambiata
anche l'ora con quella corrispondente americana.

Io controllerei intanto il timezone, ad esempio:

set time zone  'UTC+5';
[luca @ testdb on localhost] 1  > select current_time;
       timetz
--------------------
 12:25:31.763772-05

[luca @ testdb on localhost] 1  > set time zone  'UTC';
[luca @ testdb on localhost] 1  > select current_time;
       timetz
--------------------
 17:25:43.057376+00

e poi il datestyle in postgresql.conf o nella tua connessione.
Ammetto che è da un po' che non guardo questi parametri, quindi potrei
essere fuorviante, ma ritengo che sia un problema di impostazione del
tuo server remoto.  Luca

Other related posts: