Subject | Re: NOW and Daylight Saving Time |
---|---|
Author | Adam |
Post date | 2006-08-29T23:32:28Z |
--- In firebird-support@yahoogroups.com, Stefan Heymann <lists@...> wrote:
offset. Eg. Adelaide, Darwin, Kabul, Tehran ...., so either the offset
is measured in minutes or it is some decimal data type rather than an
integer.
,
customers who are not in the same Timezone as their database server,
so I really do not care what Timezone a given database server has, the
adjustment to local time should happen on the client.
http://tracker.firebirdsql.org/browse/CORE-909
I am not aware of any OS independent API that nicely handles it.
(Which is the main reason we haven't ported our UDF library to Linux)
You may need to use some conditional defines.
Adam
>You do realise there are a couple of TimeZones at n + 30 minutes
> > It is even more fun when your country has different Timezone and DST
> > rules depending on which state. I think a built in function
> > CURRENT_TIMESTAMPUTC and NOWUTC would be a welcome addition.
>
> Yes, that would be great. Or something like
> - NOW for the current local time
> - NOW_UTC for the current GMT/UTC time
> - TIME_ZONE (integer) would give +1 for UTC+0100 or -5 for UTC-0500
offset. Eg. Adelaide, Darwin, Kabul, Tehran ...., so either the offset
is measured in minutes or it is some decimal data type rather than an
integer.
,
> - DST_ON (integer) would give 1 if DST is active and 0 if notTo be honest, Timezone and DST are local issues, and we have several
>
> Sweet dreams ;-)
customers who are not in the same Timezone as their database server,
so I really do not care what Timezone a given database server has, the
adjustment to local time should happen on the client.
http://tracker.firebirdsql.org/browse/CORE-909
>The problem is that the UTC code that I use relies on the Windows API.
> > The easiest way to do it is to write a UDF function. Since you use
> > Delphi, here is some starter code for Windows. You just need to
> > modify it to output a timestamp for Firebird.
>
> With that I could only use Windows servers ...
>
> Are you aware of a good tutorial on how to write UDFs with Delphi
> *and* Kylix so I can have Windows and Linux?
I am not aware of any OS independent API that nicely handles it.
(Which is the main reason we haven't ported our UDF library to Linux)
You may need to use some conditional defines.
Adam