DreamHost Web Hosting
Discussion Forum


Forums
   >> Programming
Flat Mode*

Subject Timezone antidote on mysql  
Posted byphoenix_fly (DH New User )
Posted on09/06/05 08:25 PM


Hello everybody

Dreamhost is in GMT -7, while I´m in GMT -3 (Brazil).

I´ve given up adjusting another timezone just for me (it´s a shared hosting plan), as dreamhost staff said the .my.cnf wouldn´t work for that. So now I´m resignated to setting offset with Perl, before recording the 'datetime' columns.

But my problem is the 'timestamp' fields, on wich automatic recording relies my code. I tried setting the default of this 'timestamp' column to CURRENT_TIMESTAMP + interval 4 hour but this formula isn´t accepted by mysql as a default, not even between quotes, paranthesis or anything. The now() + interval 4 hour won´t work either.

So, before I convert them all to 'datetime' and make my sql statements act as a nanny when all I need is a timestamp behavior, I´d like to hear from you guys if you know about some work around for that.

Thanks a lot

phoenix_fly






 
Entire thread
Subject  Posted byPosted on
.Timezone antidote on mysql  phoenix_fly09/06/05 08:25 PM
.*Re: Timezone antidote on mysql  netdcon09/07/05 07:10 AM
.*Re: Timezone antidote on mysql  phoenix_fly09/07/05 02:36 PM
.*Re: Timezone antidote on mysql  MikeMoritz09/07/05 10:00 AM
Jump to