Adding 3 hours while inserting data into table

Поиск
Список
Период
Сортировка
От M Tarkeshwar Rao
Тема Adding 3 hours while inserting data into table
Дата
Msg-id 1C16813DAFF3E44B939586605D40E9F01166AC64@ESESSMB107.ericsson.se
обсуждение исходный текст
Ответы Re: Adding 3 hours while inserting data into table  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

Hi Team,

 

We are facing some inconsistence behaviour of Postgres. We have deployed our database on a server where timezone is GMT+3 hours.

We have application which is running on the same server.

 

When application starts, it is inserting the correct timestamp in the table but after running few minutes/hours we have observed that 3 hours is added into the timestamp in table. The problem resolved once the application restarted.

 

Our application is putting correct data (checked by the insert query) and in DB it is seen that 3 hours is added. The figure 3 is slightly important as the server is deployed GMT+3 hours.

 

Below are some observations and some command output along with table structure.

 

JEDEMM02:/# date;

Tue Aug  5 16:41:52 AST 2014

db_1=# show timezone;

  TimeZone

-------------

Asia/Riyadh

(1 row)

 

db_1=# select now();

              now

-------------------------------

2014-08-05 16:43:06.372363+03

(1 row)

 

 

db_1=# select current_time;

       timetz

--------------------

16:43:55.629946+03

(1 row)

 

Property in Postgres.conf

#timezone = '(defaults to server environment setting)'

 

Table Structure:

Column         |            Type             | Modifiers

------------------------+-----------------------------+-----------

msisdn                 | character varying(100)      |

offerid                | character varying(100)      |

expdatetime            | timestamp without time zone |

smslang                | character varying(20)       |

renewalflag            | character varying(100)      |

insuffbalflag          | character varying(100)      |

unsubscribeoninsufflag | character varying(100)      |

preexpiryduration      | character varying(10)       |

 

 

Regards,

M Tarkeshwar Rao

В списке pgsql-general по дате отправления:

Предыдущее
От: Marc Mamin
Дата:
Сообщение: Re: understanding why two nearly identical queries take two different planner routes, one 5s and one 2hr
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Adding 3 hours while inserting data into table