database - PostgreSQL : Converting timestamp without time zone to a specific timezone not working -


i trying migrate column in postgres timestamp without time zone timestamp time zone. want german time, used following query :

alter table table_name alter column uploaddate type timestamp time zone using uploaddate @ time zone 'utc+01:30'; 

unfortunately it's not working, it's adding 2015-06-30 07:30:48.785+05:30. in india, +5.30. how can specify query german time zone. thank you.

what timezone of timestamps stored in table? is, if there value such 2016-09-22 07:30 in table, in timezone 07:30? timezone want use, not current local timezone. e.g. if timestamps expressed in german timezone should like:

alter table table_name alter column uploaddate type timestamp time zone using uploaddate @ time zone 'europe/berlin'; 

don't forget can run above inside transaction can inspect results before commit them (of course lock entire table , block other concurrent queries table).


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -