Re: Preparing for daylight saving time changes in 2007
- From: "John Herbster" <herb-sci1_AT_sbcglobal.net>
- Date: Wed, 7 Feb 2007 20:30:24 -0600
"Sarah Bram" <sarahbram@xxxxxxxxxxx> wrote
[Regarding Preparing for daylight saving time changes]
http://support.microsoft.com/gp/dst_topissues#A2
... I do save each appointment's duration with start
and end dates. ...
Sarah,
What about any times that you are storing in your
tables?
In the b.p.database.general forum, I was recently
arguing for the need for database tables to support
storing GMT or Universal Time *plus* the local
offset, when Thorsten Engler pointed out that many
database managers and tables already do support
exactly that. It's in a SQL standard and its called
"TIMESTAMP WITH TIMEZONE". I had no idea that
this existed. A Google turned up this
http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a97269/pc_04dat.htm#27328
in which I found this description (which I copy,
because I suspect that most readers are not familiar
with it):
"TIMESTAMP WITH TIME ZONE (TSTZ) is a variant
of TIMESTAMP that includes an explicit time
zone displacement in its value. The time
zone displacement is the difference (in hours
and minutes) between local time and UTC
(Coordinated Universal Time--formerly
Greenwich Mean Time). The [TSTZ] datatype has
the form:
TIMESTAMP(fract_secs_prec) WITH TIME ZONE
where fractional_seconds_precision optionally
specifies the number of [seconds decimal
fraction digits] The default is 6."
I think that they really mean GMT or UT1 instead
of UTC, because UTC can sometime have 59 or 61
seconds per minute.
The problem, however, it that Delphi may not
allow proper connection to this type of table
field. But I have not verified this yet.
My older designs already store time as two fields
GMT time and local offset, and make use of the
OnGetText and OnSetText event handlers to correct
for the here-and-now and the then-and-there times.
HTH, JohnH
.
- Follow-Ups:
- Re: Preparing for daylight saving time changes in 2007
- From: John Herbster
- Re: Preparing for daylight saving time changes in 2007
- References:
- Preparing for daylight saving time changes in 2007
- From: Sarah Bram
- Preparing for daylight saving time changes in 2007
- Prev by Date: Re: A cross-platform vision for Delphi - updated meta-info
- Next by Date: Re: Pondering the dev tool landscape from an outsider
- Previous by thread: Re: Preparing for daylight saving time changes in 2007
- Next by thread: Re: Preparing for daylight saving time changes in 2007
- Index(es):
Relevant Pages
|