Post by Russ WestonWondering if there is a data-aware DateTime control that
reads a database datetime field (stored in UTC format)
and displays the value on the screen with respect to the
local bias.
Russ,
You can create your own OnGetText handler for the DB field
that has the TDateTime data and add you own local bias
correction.
However, I have never found that, by itself, to be useful
for historical or future date-times such as are usually
stored in a data tables, because the bias values can
change over time.
Instead, I prefer to record GMT (a.k.a. UT1 or UT2, but not
UTC) *and*, in another field, the local time offset for the
point where the date-time applied or applies. Then in the
display you can change how your OnGetText event handler
controls the correction for bias, using both field, if
required.
Regards, JohnH
PS: Microsoft misuses the term "UTC". UT1, UT2, and GMT days
have 24 hours, with each hour having 60 minutes, and each
minute having 60 seconds, with the seconds synchronized to
the rotation of the earth by stretching or compressing their
length. UTC time is based on constant length seconds with
an occasional 59 or 61 second minute used to synchronize UTC
with the rotation of the earth.