Subject | Re: [firebird-support] Re: Daylight saving |
---|---|
Author | David Johnson |
Post date | 2005-06-28T14:38Z |
Most systems today keep internal time in GMT / UTC/ or whatever acronym
you have for it, and convert for display. This functionality is
generally exposed as system calls.
Since most of my current programming is java, I use the java functions.
However, at one time I had picked up a Delphi UTC conversion package off
the internet that was just a thin wrapper around Windows API calls.
For C programming, start with "man timezone".
<The following Blatantly plagarized from the man timezone page ... >
SEE ALSO
ctime() , localtime() , mktime() , strftime() , the Base
Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment
Variables, <time.h>
you have for it, and convert for display. This functionality is
generally exposed as system calls.
Since most of my current programming is java, I use the java functions.
However, at one time I had picked up a Delphi UTC conversion package off
the internet that was just a thin wrapper around Windows API calls.
For C programming, start with "man timezone".
<The following Blatantly plagarized from the man timezone page ... >
SEE ALSO
ctime() , localtime() , mktime() , strftime() , the Base
Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment
Variables, <time.h>
On Tue, 2005-06-28 at 09:46 +0000, willogibbo wrote:
> Adam,
>
> Thanks. Yes, I was beginning to realise that a UDF is what's required
> - I haven't yet had a go at UDFs so was hoping there might be an
> easier way!
>
> The server I'm running is Linux based, but I presume that there will
> be ways of getting UTC, timezone setting & hence local time info from
> Linux?
>
> Will
>
>
>
> >
> > Hello Will,
> >
> > The solution is not simple, however it can be done using UDF's. If you
> > are using a windows setup, the Timezone information can be read from
> > the registry.
> >
> > The parameters I pass into the UDF function are the Timezone name and
> > local time and it returns the gmt time as a timestamp. But it gets
> > stored the same way as any other timestamp field.
> >
> > Adam
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>
>
>