Changing the default time in mySql

Hi all

I have the following query:


 $query1 = "INSERT INTO whoisonline VALUES (NULL,'$memberid', FROM_UNIXTIME('$lastlogin'), '$loggedfromip')";

This query works like a charm, however, I have the following problem.
The time inserted is local time on server which beloing to time zone ‘America/Denver’

I would like the time inserted to be ‘Europe/Athens’ time zone. I try with:


date_default_timezone_set('Europe/Athens');

without any success however. Any help will be deeply appreciated.

Regards, Zoreli

this should help – MySQL Server Time Zone Support

Hi r937

It won’t, since I am on shared hosting. I have no permissions to do any of the things mentioned on the page. Any other way? Any idea how to rewrite the query eventually?

Regards, Zoreli

sure

instead of inserting FROM_UNIXTIME($lastlogin), insert FROM_UNIXTIME($lastlogin + 86060)

:slight_smile: