Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Convert UTC DateTime to Local Time (Not My Local Time)

Reply
Thread Tools

Convert UTC DateTime to Local Time (Not My Local Time)

 
 
Jonathan Wood
Guest
Posts: n/a
 
      10-31-2009
I have a DateTime value that represents a UTC time (DateTime). I also have a
UTC offset value (double) and a Daylight Savings Time value (bool) for a
local time. How best to calculate the local time from this data?

I've been searching the web for a while now. I've found a lot of interesting
new classes and various ways to approach this. But not one is dealing with
data in the form described above.

More Info:

I'm building a website where people can post comments. The date of each
comment is stored in the database as UTC time. My site also needs to track
which region each user is from. So my region table contains time zone
information which I need to apply to the UTC time. I'm opening to storing
different data types, etc. But I don't want to make this much more
complicated.

Thanks.

Jonathan


 
Reply With Quote
 
 
 
 
Jonathan Wood
Guest
Posts: n/a
 
      11-01-2009
I'm aware of that--I'm involved in that discussion. But it is not being
productive. So, if someone wants to weigh in here, why not let them?

> This question is already being discussed in the C# newsgroup...


Jonathan


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert stored mysql DateTime of UTC datetime stamp into another timezone Justin Voelker Javascript 2 12-02-2008 08:23 PM
convert time string in UTC to time in local time davelist@mac.com Python 1 03-11-2007 12:57 AM
Covert UTC String to UTC Datetime =?Utf-8?B?aGVuaw==?= ASP .Net 3 05-07-2006 06:25 PM
datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Christos TZOTZIOY Georgiou Python 3 09-13-2003 10:44 AM
RE: datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Tim Peters Python 0 09-09-2003 12:57 AM



Advertisments