Jump to content

Setting a default timezone?


c-o-d-e

Recommended Posts

I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY there.

If thats not possible, if I had..;

$time = date("d-m-Y H-i-s" time());

or.. if I had

$time = time();

 

I think I am 6 hours ahead PHPMYADMIN time.

To set it in php.. would it be..

 

$t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though.
$time = date("d-m-Y H:i:s" time()) + $t; // For the current date

// Or like..
$t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though.
$time = time() + $t; // For the currunt unix timestamp

 

Also, how would I change the PHPMYADMIN default timestamp.. so that when I enter the dates, it'll show up with .. the correct time for GMT-london.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/185097-setting-a-default-timezone/
Share on other sites

http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html

 

Unless you have root access to change the system_time_zone or global time_zone, you would need to set the Per-connection time zone using a query in your script before you execute any queries that are time zone dependent.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.