Hello;
I have locations world wide, but my times are recorded in EST.
I need to convert to local time, within SQL 2008 using UTC.
Has any one done this?
Within the individual records I have different locations around the globe. I need to match the individual locations with the proper time zone and alter the datetimes accordingly.
I wanted to know if any one has built a table with UTC country, city, date, time to GMT date, time conversion.
INPUT
Country Starttime
--------------- --------------------
Australia Nov 24 2009 8:04PM
South Africa Mar 18 2010 5:02PM
India Mar 24 2010 9:18AM
United Kingdom Mar 22 2010 4:17AM
China Mar 24 2010 11:04PM
OUTPUT
Country ADJUSTED - Starttime
--------------- --------------------
Australia Nov 24 2009 8:04PM <==?
South Africa Mar 18 2010 5:02PM
India Mar 24 2010 9:18AM
United Kingdom Mar 22 2010 4:17AM
China Mar 24 2010 11:04PM
I'm positive that some countries span multiple time zones. The united states spans quite a few, and I am sure China must span quite a few also.
You may want to take a look at geonames. There are lots of things to be downloaded from there that may be useful to you. Without looking too closely, I would suggest here:
Specifically a file named tz.zip. The zip file has a tz.txt that you should be able to import into SQL Server.
I'm not 100% certain that this is what you are looking for, but I do recommend you take a look. It's where I would start looking if this were my project.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.