Re: Time zone
- From: "William Stacey [C# MVP]" <william.stacey@xxxxxxxxx>
- Date: Thu, 15 Mar 2007 00:27:36 -0400
I would add another thing. Always get, set, calc, and store only UTC
datetimes. That way, you never have any date confusion. Your client side
can easily convert to/from UTC so they can display local times. This also
makes it possible for same client to store a record in home time zone and
change their time zone when they travel and still get and use the datetime
correctly because it converted from UTC and it just works even on their new
timezone.
--
William Stacey [C# MVP]
PCR concurrency library: www.codeplex.com/pcr
PSH Scripts Project www.codeplex.com/psobject
"Arne Vajhøj" <arne@xxxxxxxxxx> wrote in message
news:45f8a2ba$0$90262$14726298@xxxxxxxxxxxxxxxxxx
| Sehboo wrote:
| > Yes, I know exactly what timezone to set for each customer, and since
| > all the customers have their own database, there won't be any
| > confusion, but how/where to set timezone in database?
|
| I think you are taking the wrong approach.
|
| Store all time info in DATETIME columns.
|
| Never let the server set the time - always set the
| time from the client apps.
|
| Always use parameters both to set and get the time.
|
| Then it should always work, because
| the timezone of the server does not matter. You send
| binary time forth and back all the time.
|
| Arne
.
- References:
- Time zone
- From: Sehboo
- Re: Time zone
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Time zone
- From: Sehboo
- Re: Time zone
- From: Arne Vajhøj
- Time zone
- Prev by Date: Generic methods..
- Next by Date: Re: Business Entity Hierarchy OO question
- Previous by thread: Re: Time zone
- Next by thread: Re: Time zone
- Index(es):
Relevant Pages
|
Loading