What about using SQL time and date functions?

In MySQL at least you could do the following

TIME_TO_SEC(NOW())

(see 
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_time-to-sec)

Is there a postgresql equivalent?


Stuart


On 07/03/2010 22:49, Kristis Makris wrote:
> Martin, unix_timestamp() is not available for postgres, or other
> databases. I am not sure what is the best way to handle this. I wonder
> how the Mantis developers handle it.
>
> On Sun, 2010-02-28 at 11:29 +0100, Martin Fuchs wrote:
>> Hello,
>>
>> there is now the new Mantis release 1.2.0:
>>
>> http://www.mantisbt.org/
>>
>>
>> One change includes this:
>>
>> - Migrated away from DATETIME fields to integer timestamps for timezone usage
>>
>> To become compatible to this new version, Scmbug should be changed to set 
>> all date fields to unix_timestamp() instead of now() when inserting new rows 
>> in the Mantis MySQL database.
>>
>>
>> Regards,
>>
>>      Martin
>> _______________________________________________
>> scmbug-users mailing list
>> [email protected]
>> http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
>>
>>
>> _______________________________________________
>> scmbug-users mailing list
>> [email protected]
>> http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to