Subject Re: [firebird-support] ISC_TIMESTAMP Issue
Author Kurt Federspiel
I currently have this system set up to dual-boot. But that doesn't explain why one application (i.e. FlameRobin) gets the time correct, and another (my app) gets it 59 minutes off. I'm just wondering if there is a trick to pulling/converting time.

I have a test system I can try on tomorrow (that is not dual boot).

Thanks, Lester.
Kurt.



----- Original Message ----
From: Lester Caine <lester@...>
To: firebird-support@yahoogroups.com
Sent: Friday, June 27, 2008 10:54:10 PM
Subject: Re: [firebird-support] ISC_TIMESTAMP Issue


Kurt Federspiel wrote:
> Greets.
>
> I have an application that is attempting to do a time-weighted average of data, but I am having an issue with Time Stamps. This application was working on WinXP/FB 2.03. I am porting it to Linux (Ubuntu)/FB 2.1.
>
> The table contains two time stamps: Start, End. These two values were input via FlameRobin as the following values: 'NOW' and '2008-06-27 17:00:00'
>
> If I select on the table using FlameRobin, I get the correct time ('2008-06-27 15:02:33' and '2008-06-27 17:00:00').
>
> However, my application returns the time an hour off (with the following debug info):
> trend_main.h: 144 Start: 2008-06-27 16:03:33
> trend_main.h: 160 Stop: 2008-06-27 18:00:00
>
> When I pull the ISC_TIMESTAMP from the DB, I convert it to a struct tm using isc_decode_timestam p().
>
> Is there something I am doing wrong or is there another method to compute the time stamp from the DB??

I don't believe there is an 'daylight saving' or 'local timezone' conversions
IN Firebird, so it is more likely to be happening inside your application. On
PHP I run the servers with clock set to 'UTC' so that there are no problems
with what is being either stored or displayed, and then add the conversions to
'local time' away from the database read.

--
Lester Caine - G8HFL
------------ --------- --------
Contact - http://lsces. co.uk/lsces/ wiki/?page= contact
L.S.Caine Electronic Services - http://lsces. co.uk
EnquirySolve - http://enquirysolve .com/
Model Engineers Digital Workshop - http://medw. co.uk//
Firebird - http://www.firebird sql.org/index. php





[Non-text portions of this message have been removed]