Subject | Re: [firebird-support] UTC Time from server |
---|---|
Author | David Johnson |
Post date | 2005-08-28T00:04:55Z |
End users rarely use SQL directly in most environments. Make the
conversions the responsibility of the GUI layer. If it is a hard
business rule that local times exist only in the GUI display layer, and
never leave that layer without being converted to UTC,
Store all times in UTC/GMT. Perform conversions on input and display in
the application layer. Depending on the precision and accuracy needed
in your time stamps, it may be adequate to synchronize your system times
every few hours with SNTP as Ivan suggested. If higher precision is
required than a few milliseconds, then you may want to invest in some
high precision timekeeping hardware. (it still bugs me that my $5.00
disposable watch keeps better time than a $2,000 computer)
It may be useful to also save the UTC offset for the creating and last
updating user in numeric 3,1 format (+/- 12 hours with allowances for
the 1/2 hour offsets in Newfoundland and other odd timezones), depending
on your business and audit needs.
conversions the responsibility of the GUI layer. If it is a hard
business rule that local times exist only in the GUI display layer, and
never leave that layer without being converted to UTC,
Store all times in UTC/GMT. Perform conversions on input and display in
the application layer. Depending on the precision and accuracy needed
in your time stamps, it may be adequate to synchronize your system times
every few hours with SNTP as Ivan suggested. If higher precision is
required than a few milliseconds, then you may want to invest in some
high precision timekeeping hardware. (it still bugs me that my $5.00
disposable watch keeps better time than a $2,000 computer)
It may be useful to also save the UTC offset for the creating and last
updating user in numeric 3,1 format (+/- 12 hours with allowances for
the 1/2 hour offsets in Newfoundland and other odd timezones), depending
on your business and audit needs.
On Sat, 2005-08-27 at 23:40 +0100, Richard wrote:
> Ivan Cruz wrote:
> >>Does that mean that you *can't* get the server UTC time?
> >>
> > No!!! I mean your server don't have a UTC time. UTC time (at last
> > in the way I understand it) is Universal Cordinated Time and is similar
> > to atomic time, except by a leap second added from time to time.
> > The leap second is added to compesate small variations in earth
> > rotation.
> >
> > Your server have a system time, calculated from the ticks generated
> > by very imprecise hardware parts. To have your system time
> > more or less syncronized to the UTC time, you will need a SNTP
> > (Simple Network Time Protocol) client.
> >
> > Ivan.
>
> Ah, I see.
> Well, I am just trying to find out the UTC or GMT time of the server, so
> that I can store all of my clients time as the servers system time so
> that I can handle clients being in multiple time zones, but still get
> them to update a central database with the database time as opposed to
> the clients "local" time.
> Any ideas how I would go about this?
>
> Richard
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>