time zone in wep application.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marlon

    #1

    time zone in wep application.

    What is the best way to deal time zone difference in Wep application.

    Is there a best pattern and practice for this?
  • Joey

    #2
    Re: time zone in wep application.

    I have had good success in using UTC (Universal Timing
    Convention/"Zulu"/Greenwich/etc) dates/times. It is even easier (for
    you) if you just post them that way on your site... As far as asp.net
    goes, the DateTime functions already have UTC built
    in...(DateTime. UtcNow instead of DateTime.Now, etc...). Also, in the
    case of MS SQL 2005 (and maybe MS SQL 2000?), there are built in
    functions also...GETUTCDA TE() instead of GETDATE()...etc . This is just
    an idea...


    Marlon wrote:[color=blue]
    > What is the best way to deal time zone difference in Wep application.
    >
    > Is there a best pattern and practice for this?[/color]

    Comment

    • Marlon R

      #3
      Re: time zone in wep application.

      Thanks Joey,
      I am aware of these options.
      Are there any built-in communications between browser and server that would
      indicate the current time zone for the client computer .

      I know that the getTimeZoneOffs et method can be used to determine the
      difference local time and GMT.
      I was just hope that a method was already implemented or a best pratice.

      thanks again



      "Joey" <joey.powell@to pscene.com> wrote in message
      news:1137076633 .229611.191630@ o13g2000cwo.goo glegroups.com.. .[color=blue]
      >I have had good success in using UTC (Universal Timing
      > Convention/"Zulu"/Greenwich/etc) dates/times. It is even easier (for
      > you) if you just post them that way on your site... As far as asp.net
      > goes, the DateTime functions already have UTC built
      > in...(DateTime. UtcNow instead of DateTime.Now, etc...). Also, in the
      > case of MS SQL 2005 (and maybe MS SQL 2000?), there are built in
      > functions also...GETUTCDA TE() instead of GETDATE()...etc . This is just
      > an idea...
      >
      >
      > Marlon wrote:[color=green]
      >> What is the best way to deal time zone difference in Wep application.
      >>
      >> Is there a best pattern and practice for this?[/color]
      >[/color]


      Comment

      • Joey

        #4
        Re: time zone in wep application.

        Couldn't you use getTimeZoneOffs et to apply to UTC and get their local
        times?

        Comment

        • Steven Cheng[MSFT]

          #5
          Re: time zone in wep application.

          Thanks for Joey's suggestion.

          Hi Marlon,

          For ASP.NET application it running on the serverside so it has limited
          access to most of the clientside info. And so far for getting clientside
          timezone info, you can consider Joey's suggest that use javascript to get
          the TimezoneOffset .... e.g:

          <script language="javas cript">
          function Disp_TZ()
          {
          var dt = new Date();

          var offsetMin =dt.getTimezone Offset()/60;

          alert("Your local timezone offset: " + offsetMin + " ");
          }
          </script>

          Thanks,

          Steven Cheng
          Microsoft Online Support

          Get Secure! www.microsoft.com/security
          (This posting is provided "AS IS", with no warranties, and confers no
          rights.)




          --------------------
          | From: "Joey" <joey.powell@to pscene.com>
          | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
          | Subject: Re: time zone in wep application.
          | Date: 12 Jan 2006 08:20:41 -0800
          | Organization: http://groups.google.com
          | Lines: 3
          | Message-ID: <1137082841.054 159.257940@g47g 2000cwa.googleg roups.com>
          | References: <82F5E50D-3F5A-494E-89E7-606BFF1CF818@mi crosoft.com>
          | <1137076633.229 611.191630@o13g 2000cwo.googleg roups.com>
          | <#LgBGx4FGHA.29 12@tk2msftngp13 .phx.gbl>
          | NNTP-Posting-Host: 155.147.14.9
          | Mime-Version: 1.0
          | Content-Type: text/plain; charset="iso-8859-1"
          | X-Trace: posting.google. com 1137082845 22686 127.0.0.1 (12 Jan 2006
          16:20:45 GMT)
          | X-Complaints-To: groups-abuse@google.co m
          | NNTP-Posting-Date: Thu, 12 Jan 2006 16:20:45 +0000 (UTC)
          | In-Reply-To: <#LgBGx4FGHA.29 12@tk2msftngp13 .phx.gbl>
          | User-Agent: G2/0.2
          | X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
          ..NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
          1.0.3705),gzip( gfe),gzip(gfe)
          | Complaints-To: groups-abuse@google.co m
          | Injection-Info: g47g2000cwa.goo glegroups.com; posting-host=155.147.14 .9;
          | posting-account=quLkng0 AAADPxeWcCK254A 0yusgzOfm6
          | Path:
          TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
          ne.de!border2.n ntp.dca.giganew s.com!border1.n ntp.dca.giganew s.com!nntp.giga n
          ews.com!postnew s.google.com!g4 7g2000cwa.googl egroups.com!not-for-mail
          | Xref: TK2MSFTNGXA02.p hx.gbl
          microsoft.publi c.dotnet.framew ork.aspnet:3703 67
          | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
          |
          | Couldn't you use getTimeZoneOffs et to apply to UTC and get their local
          | times?
          |
          |

          Comment

          Working...