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

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top