Subject Re: UTC Time from server
Author Rick Roen
--- In firebird-support@yahoogroups.com, Richard <RichardM@m...> wrote:
> Hi,
>
> What SQL syntaxt would I use to retrieve the UTC time from a
Firebird
> 1.5 server?
>
> Thanks in advance
>
> --
> Richard Mace

If you are working in a Windows environment you can start at the
application layer and use the Windows API call
GetTimeZoneInformation. This fills in a TIME_ZONE_INFORMATION
structure that includes the bias - the difference in mins between
local time and UTC.

I guess you could just store this in your DB and refer to the bias
each time you need to set a timestamp.

You would just need to update this regularly since the offset might
change due to your local daylight savings schedule.

You could Google "GetTimeZoneInformation" to get some samples of how
to do this in whatever programing language you use.

Rick