Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Convert Local Time To UTC

$
0
0
Hi All

I have a table that contains 521 cities with lat long coordinates in a PostgreSQL database

Does anyone know of a way to get the UTC number for each of the cities

So for example lets say I live in Germany. It would simply return + 1

Or if i supplied it with a time stamp from the UK, it would convert it to UTC time i.e. 2pm would become 3pm

The offset for the hours will be different for different time zones

The database contains a table where records are inserted every couple of seconds. I want to convert the time stamp to UTC for analysis for a Report I'm building. The table that contains the 521 records is a reference table

Is this possible in PostgreSQL SQL or will i have to go down the Python route

Thank you for your time

Viewing all articles
Browse latest Browse all 13329

Trending Articles