Specifying the default timezone

N

Nathan Sokalski

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.
 
G

Guest

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, I think you can't do it on the global level.
 
G

Gregory A. Beamer

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top