Subject Re: [firebird-support] unix time
Author Helen Borrie
At 10:03 AM 15/10/2004 +0100, you wrote:

>I've got to convert some data from a timestamp to a unix seconds timer
>is it as simple as CAST (( timestamp * 24 * 60 * 60 ) + something AS
>INTEGER ) or do I need a UDF to sort it out ;)

It seems to depend on how much you care about "leap-seconds". The purists
want you to use a complicated algorithm to take them into account; the PHP
folk seem quite happy to take 1970-01-01 00:00:00 UHT as time zero and just
add 86,000 per day + seconds since midnight.

I see that MySQL has quite a lot of UDFs floating about for converting
between unix time and MySQL's ctime (whatever that might be...)

./h