Specifying the default timezone

Discussion in 'ASP .Net' started by Nathan Sokalski, Jun 25, 2009.

  1. I have an application in which I want to use a certain timezone. I do not
    want to need to specify the timezone every time I use a date-related method
    or function, so is there some way I can specify a default timezone in either
    the Web.config or somewhere else? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Jun 25, 2009
    #1
    1. Advertising

  2. On Jun 25, 9:33 pm, "Nathan Sokalski" <> wrote:
    > I have an application in which I want to use a certain timezone. I do not
    > want to need to specify the timezone every time I use a date-related method
    > or function, so is there some way I can specify a default timezone in either
    > the Web.config or somewhere else? Thanks.
    > --
    > Nathan Sokalski
    > ://www.nathansokalski.com/


    Nathan, I think you can't do it on the global level.
     
    Alexey Smirnov, Jun 25, 2009
    #2
    1. Advertising

  3. "Nathan Sokalski" <> wrote in
    news:#:

    > I have an application in which I want to use a certain timezone. I do
    > not want to need to specify the timezone every time I use a
    > date-related method or function, so is there some way I can specify a
    > default timezone in either the Web.config or somewhere else? Thanks.



    You set it in Windows, by setting the timezone there. Then everything works
    on that timezone.

    A better way to handle this is to set all of your time fields to UTC. Then,
    if the location of the server changes, you do not have to recalculate
    times. You would still set the timezone on the server for display, however.


    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
     
    Gregory A. Beamer, Jun 29, 2009
    #3
    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. Maitland

    scope of default TimeZone

    Maitland, Mar 2, 2005, in forum: Java
    Replies:
    2
    Views:
    473
    Angus
    Mar 3, 2005
  2. asaf
    Replies:
    3
    Views:
    6,189
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Sep 11, 2006
  3. axrock
    Replies:
    8
    Views:
    976
    Roedy Green
    Mar 25, 2009
  4. Tharinda
    Replies:
    3
    Views:
    1,237
    peter koch
    Aug 25, 2010
  5. Ami
    Replies:
    5
    Views:
    297
Loading...

Share This Page