Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Convert stored UTC time to webuser's local time?

Reply
Thread Tools

Convert stored UTC time to webuser's local time?

 
 
Mark B
Guest
Posts: n/a
 
      09-23-2009
ASP.NET 3.5, VB.NET.

In ASP.NET, I have a DateTime variable which I assign from an SQL database
UTC Date field:

dtFirstMeetingDateTime (e.g. September 30, 2009 3:44:00 PM UTC)

I need to display this on a webpage in the webuser's format and time. They
can be anywhere and in any language around the world. E.g., I need to
display the string:

"30/09/2009 4:44:00 AM (New Zealand Daylight Time)"


If anyone can help with the code needed to do this I'd appreciate it a lot.


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      09-24-2009
On Sep 24, 1:28*am, "Mark B" <(E-Mail Removed)> wrote:
> ASP.NET 3.5, VB.NET.
>
> In ASP.NET, I have a DateTime variable which I assign from an SQL database
> UTC Date field:
>
> dtFirstMeetingDateTime (e.g. September 30, 2009 3:44:00 PM UTC)
>
> I need to display this on a webpage in the webuser's format and time. They
> can be anywhere and in any language around the world. E.g., I need to
> display the string:
>
> "30/09/2009 4:44:00 AM (New Zealand Daylight Time)"
>
> If anyone can help with the code needed to do this I'd appreciate it a lot.


The easiest way is to show a list of available time zones (TZ) where
user can select one of them. Another approach could be to use js to
submit client time to the server where you could define client's TZ.
 
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 UTC DateTime to Local Time (Not My Local Time) Jonathan Wood ASP .Net 1 11-01-2009 12:08 AM
convert UTC to local time(system time) and vice vesra in VB.NET deepak ASP .Net 1 02-06-2008 02:34 PM
convert time string in UTC to time in local time davelist@mac.com Python 1 03-11-2007 12:57 AM
Convert UTC to Local Time vunet.us@gmail.com Javascript 6 03-09-2007 02:12 AM
Covert UTC String to UTC Datetime =?Utf-8?B?aGVuaw==?= ASP .Net 3 05-07-2006 06:25 PM



Advertisments