RT (Request Tracker) Date Handling

Rick Measham rickm at printaform.com.au
Thu Nov 6 22:36:38 CST 2003


At 15:28 +1100 2003-11-07, Scott Penrose wrote:
>My problem is how to make this work with the existing code and 
>existing database, both of which I don't have access to changing. 
>Nor do I have the ability to futz with the results after the SQL.
>
>Damn them !
>
>Is there some way I can add 11 hours in the query in mySql
>
>eg:
>	UNIX_TIMESTAMP(LastUpdated) + (11 * 3600) as uts
>

I don't use mySQL myself, but from the docs online 
(http://www.mysql.com/doc/en/Date_and_time_functions.html) it appears 
to be a case of

select UNIX_TIMESTAMP(LastUpdated + INTERVAL 11 HOUR)

OR

select UNIX_TIMESTAMP(LastUpdated)+(11*60*60)

Just remember that for any timestamps before (10 hours before the DST 
change over) you will need to add just 10 hours.

:)

Ain't DateTime fun?

Cheers!
Rick



More information about the Melbourne-pm mailing list