Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Specifying the default timezone

Reply
Thread Tools

Specifying the default timezone

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      06-25-2009

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/


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-25-2009
On Jun 25, 9:33*pm, "Nathan Sokalski" <njsokal...@hotmail.com> 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
> njsokal...@hotmail.comhttp://www.nathansokalski.com/


Nathan, I think you can't do it on the global level.
 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      06-29-2009

"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! |
*******************************************
 
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
Converting time historic GMT to local time by specifying a timezone Tharinda C++ 3 08-25-2010 05:32 PM
TimeZone change - how to use TimeZone class axrock Java 8 03-25-2009 11:54 PM
TimeZone calculation on Windows Vista with DateTime::TimeZone Ami Perl Misc 5 09-24-2007 07:27 AM
Convert windows TimeZone to Java TimeZone asaf Java 3 09-11-2006 05:40 PM
scope of default TimeZone Maitland Java 2 03-03-2005 02:16 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57