Convert stored UTC time to webuser's local time?

Discussion in 'ASP .Net' started by Mark B, Sep 24, 2009.

  1. Mark B

    Mark B Guest

    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.
     
    Mark B, Sep 24, 2009
    #1
    1. Advertising

  2. On Sep 24, 1:28 am, "Mark B" <> 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.
     
    Alexey Smirnov, Sep 24, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?aGVuaw==?=

    Covert UTC String to UTC Datetime

    =?Utf-8?B?aGVuaw==?=, May 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    18,765
    Egbert Nierop \(MVP for IIS\)
    May 7, 2006
  2. Replies:
    1
    Views:
    815
    Paul Boddie
    Mar 11, 2007
  3. deepak
    Replies:
    1
    Views:
    30,678
    Kevin Spencer
    Feb 6, 2008
  4. Jonathan Wood
    Replies:
    1
    Views:
    2,213
    Jonathan Wood
    Nov 1, 2009
  5. Convert UTC to Local Time

    , Mar 8, 2007, in forum: Javascript
    Replies:
    6
    Views:
    200
Loading...

Share This Page