
June 1st, 2004, 01:26 PM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 25
|
|
|
RE: Time Zone offset possible?
Just in case anyone is interested, I had the same problem. Here's how I got around it...
At the beginning of calendar.php (after the 2 'require_once' lines), add the following line:
php Code:
Original
- php Code |
|
|
|
(9.5 is my local timezone, but you'll need to replace that number with your local timezone offset in hours from GMT)
Then change the following lines in calendar.php...
php Code:
Original
- php Code |
|
|
|
if ( ! isset($_REQUEST['timestamp']) ) $_REQUEST['timestamp'] = time();
to
php Code:
Original
- php Code |
|
|
|
if ( ! isset($_REQUEST['timestamp']) ) $_REQUEST['timestamp'] = gmdate("U", time() + $zone);
php Code:
Original
- php Code |
|
|
|
if ( ! isset($_REQUEST['start_date']) ) $_REQUEST['start_date'] = date('Y-n'). '-1';
to
php Code:
Original
- php Code |
|
|
|
if ( ! isset($_REQUEST['start_date']) ) $_REQUEST['start_date'] = gmdate('Y-n', time() + $zone). '-1';
php Code:
Original
- php Code |
|
|
|
to
php Code:
Original
- php Code |
|
|
|
This should enable the calendar to run in your local timezone. If in doubt add
php Code:
Original
- php Code |
|
|
|
to the end of the file and see what time is displayed on the page.
|