Showing posts with label gmt. Show all posts
Showing posts with label gmt. Show all posts

Sunday, February 26, 2012

GMT time to CST with daylight savings

I have the database on a GMT server and a logdate that is in GMT too. How do I convert this into CST (GMT -6) , during daylight savings (GMT-5) when passing it back to the webpage.

I can use DATEADD(hh,-6,LogDate) but how do I know if the daylight savings period has started to do DATEADD(hh,-5,LogDate). I also want to solve this at the database level without altering the front-end.

Thanks.

Is your database server in CST? And really, the conversion SHOULD be done on the front end.|||

database is on GMT.

Ok if on frontend how do i do it. I have around 7000 rows to be retrieved and all need to be converted to CST from GMT. Is there a quick way to do this. I have everything in the dataset/datatable.

|||Also the server now is on CST but can be moved to EST anyday. Can I have a key in web.config to be changed when this is done. Daylight savings is also an important issue here.

GMT Time

I have got GMT Time Data on my database.
It is possible to used the user's time on a chart or in a table ?You can convert GMT (now called UTC) time to local time using
DateTime.ToLocalTime() method. Check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatetimeclasstolocaltimetopic.asp
for details.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Karine" <Karine@.discussions.microsoft.com> wrote in message
news:280C890D-4DE7-4DF1-9FD0-D6DD7C3E1191@.microsoft.com...
> I have got GMT Time Data on my database.
> It is possible to used the user's time on a chart or in a table ?

GMT date problems

hi,

my web site and sql server are hosted in USA whereas I live in Iceland. When I blog all dates are saved from the USA server's date using the GETDATE() function. Can I change some sql server settings to make it save for my local (icelandic) time?

The best thing you can do s to change the lcid.|||Try this link for some options. Hope this helps.
http://www.karaszi.com/SQLServer/info_datetime.asp