![]() ![]() It is designed to avoid time zone problems such as daylight savings and so on. Postgres processes all of its "timestamp with time zone" data types in this way. The result? ' 17:50:57.136817' further into the future still!Īgain I must stress the reason it can do this is because it is always converting the input time offset to UTC or GMT. Select ' 08:50:57.136817 America/New_York'::timestamp with time zone at time zone 'PKT' ![]() 5 hours into the "future"!įinally let's get the original timestamp and display it in what I believe is the Pakistan time zone (PKT) and see what it shows Select ' 08:50:57.136817 America/New_York'::timestamp with time zone at time zone 'GMT' Now if we take that same time and display it in GMT we will see a different result: 8:50 Saturday morning, or 8:51 if you're being pedantic. Select now()::timestamp with time zone at time zone 'America/New_York' Īt the time of asking it returned ' 08:50:57.136817'. ![]() When you save a "timestamp with time zone" value at GMT + or - any value, the system offsets whatever timezone your input was to GMT (or UTC), so that when you go to retrieve it, you can specify the timezone you want it displayed in.įor example let's establish a current time for say. The reason pgadmin is displaying hours +5 is because your system timezone is set to this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |