How to set my website to right time zone if my server is abroad.
Open the file inc/functions.php.
Search for the following code lines :
function GetCurrentDateTime() {
$ÂÂÂdateout = date("YmdHi");
return $ÂÂÂdateout;
}
For version V4.6.12, it's somewhere about line 558.
Then replace those lines with the following code:
So just replace "Europe / Paris" by the correct time zone e.g. "America / Montreal" to find such http://www.php.net/manual/en/timezones.php
Note: this FAQ is obsolete since version 4.6.18 which allows changing timezone from admin.
Search for the following code lines :
function GetCurrentDateTime() {
$ÂÂÂdateout = date("YmdHi");
return $ÂÂÂdateout;
}
For version V4.6.12, it's somewhere about line 558.
Then replace those lines with the following code:
function GetCurrentDateTime() {
$ÂÂÂhourdiff = "0";
$ÂÂÂtimeadjust = ($ÂÂÂhourdiff * 60 * 60);
$ÂÂÂdateout = date("YmdHi",time() + $ÂÂÂtimeadjust);
return $ÂÂÂdateout;
}
$ÂÂÂhourdiff is the time between your web server time and the time of the country you live.
You need to use the sign + or - plus hours between the web server time and your country time.
Like this : hourdiff = "+9"
In PHP 5
Line 84 of file inc / includes.inc initializes the reference time zone. By default, it initializes GuppY at the time of Paris.
date_default_timezone_set('Europe/Paris');
So just replace "Europe / Paris" by the correct time zone e.g. "America / Montreal" to find such http://www.php.net/manual/en/timezones.php
Note: this FAQ is obsolete since version 4.6.18 which allows changing timezone from admin.
Creation date : 15/02/2005 @ 18:49
Category : - Webhosting services issues
Page read 16275 times