Add support for different calendar timezone

Got some ideas as to how the calendar could be improved?
No bugs, no installation issues, just your ideas as to what could be added or changed in this Availability Calendar (remember, this is NOT a bookings calendar by default)

Add support for different calendar timezone

Postby rak » Mon Oct 17, 2011 10:08 am

If the timezone of your server and calendar are different - eg. running on a server in California and displaying a calendar for events in Tokyo (16hrs ahead) - then the 'Today' indicator might show the wrong day.

If your server runs PHP 5.1, you can add this line to ac-config.inc.php to set the timezone for the calendar:
Code: Select all
date_default_timezone_set('Asia/Tokyo');

Replace 'Asia/Tokyo' with the timezone you need, find the correct format here: http://www.php.net/manual/en/timezones.php

This will only work with PHP 5.1, I'm not sure if there's a way to easily do this with PHP 3/4.
rak
 
Posts: 1
Joined: Mon Oct 17, 2011 9:38 am

Re: Add support for different calendar timezone

Postby chris » Mon Oct 17, 2011 4:03 pm

This is a good suggestion..
Now, my issue would be how to make this a configuration value as opposed to having to modify the code.
It is something that I should consider for future versions.

Thanks.

Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron