diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-05-09 20:28:56 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-05-09 20:28:56 +0000 |
commit | 61c18056b9f85a789b789e7ddbe6fad09e74d92f (patch) | |
tree | 4f0f8dc315060d65006ea0a4787802be6ff7b8ef | |
parent | f6f28f72894b5d54e9ded8c72c927bc8168e336f (diff) | |
download | phpicalendar-61c18056b9f85a789b789e7ddbe6fad09e74d92f.tar.gz phpicalendar-61c18056b9f85a789b789e7ddbe6fad09e74d92f.tar.bz2 phpicalendar-61c18056b9f85a789b789e7ddbe6fad09e74d92f.zip |
Added server offset in seconds.
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | config.inc.php | 3 | ||||
-rw-r--r-- | day.php | 4 | ||||
-rw-r--r-- | functions/init.inc.php | 2 | ||||
-rw-r--r-- | month.php | 2 | ||||
-rw-r--r-- | week.php | 2 |
6 files changed, 8 insertions, 6 deletions
@@ -79,6 +79,7 @@ Changes: -Added support for LOCATION -Added support for ATTENDEE -Added support for STATUS + -Added the ability to correct the servers time display -Added admin.php for administration of calendars (uses cookies). See config.inc.php for configuration. -Add or Update a calendar via a web interface -Delete a calendar via a web interface diff --git a/config.inc.php b/config.inc.php index f88c14f..1f6489e 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1,6 +1,6 @@ <?php -// Configuration file for PHP iCalendar 0.9.1 +// Configuration file for PHP iCalendar 0.9.2 // // To set values, change the text between the single quotes // Follow instructions to the right for detailed information @@ -22,6 +22,7 @@ $timezone = ''; // Set timezone. Read TIMEZONES file for more information $default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar $tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X) $calendar_path = ''; // Leave this blank on most installs, place your full path to calendars if they are outside the phpicalendar folder. +$second_offset = '0'; // The time in seconds between your time and your server's time. // Advanced settings for custom installs, cookies, etc. // In most cases these will not need to be set. @@ -2,7 +2,7 @@ if (isset($HTTP_GET_VARS['jumpto_day'])) { $jumpto_day_time = strtotime($HTTP_GET_VARS['jumpto_day']); if ($jumpto_day_time == -1) { - $getdate = date('Ymd'); + $getdate = date('Ymd', strtotime("now + $second_offset seconds")); } else { $getdate = date('Ymd', $jumpto_day_time); } @@ -15,7 +15,7 @@ if ($minical_view == 'current') $minical_view = 'day'; $starttime = '0500'; $weekstart = 1; $unix_time = strtotime($getdate); -$today_today = date ('Ymd'); +$today_today = date ('Ymd', $unix_time); $tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time)); $yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time)); $display_date = localizeDate($dateFormat_day, $unix_time); diff --git a/functions/init.inc.php b/functions/init.inc.php index ae9812c..2b44e69 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -35,7 +35,7 @@ if (!isset($getdate)) { if (isset($HTTP_GET_VARS['getdate']) && ($HTTP_GET_VARS['getdate'] !== '')) { $getdate = $HTTP_GET_VARS['getdate']; } else { - $getdate = date('Ymd'); + $getdate = date('Ymd', strtotime("now + $second_offset seconds")); } } @@ -11,7 +11,7 @@ $this_month = $day_array2[2]; $this_year = $day_array2[1]; $unix_time = strtotime($getdate); -$today_today = date ("Ymd"); +$today_today = date ('Ymd', $unix_time); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); $yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); $date = mktime(0,0,0,"$this_month","$this_day","$this_year"); @@ -9,7 +9,7 @@ $starttime = "0500"; $weekstart = 1; $unix_time = strtotime($getdate); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); -$today_today = date ("Ymd"); +$today_today = date ('Ymd', $unix_time); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); |