aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-11-01 17:50:47 +0000
committerjwangen <jwangen>2002-11-01 17:50:47 +0000
commit627175b51031696cbf22fce48e11fe42cf9b28bf (patch)
tree1c98065610ad83b44f3e609e2ff0142657bcf6d0
parent9540aab144ce14822b514222a6b78a0d832d31f1 (diff)
downloadphpicalendar-627175b51031696cbf22fce48e11fe42cf9b28bf.tar.gz
phpicalendar-627175b51031696cbf22fce48e11fe42cf9b28bf.tar.bz2
phpicalendar-627175b51031696cbf22fce48e11fe42cf9b28bf.zip
updated Japanese, fixed bug with Zulu time calendars
-rw-r--r--config.inc.php6
-rw-r--r--functions/ical_parser.php11
2 files changed, 13 insertions, 4 deletions
diff --git a/config.inc.php b/config.inc.php
index 71c6cc7..2831762 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -10,7 +10,7 @@ $calendar_path = './calendars'; // Path to directory with calendars
$default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year'
$minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current'
$default_cal = 'School'; // Exact filename of calendar without .ics
-$language = 'english'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese'
+$language = 'japanese'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese'
$week_start_day = 'Sunday'; // Day of the week your week starts on
$day_start = '0700'; // Start time for day grid
$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
@@ -19,7 +19,7 @@ $month_event_lines = '1'; // Number of lines to wrap each event title in mo
$tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines.
$week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
-$timezone = ''; // Set timezone. Read TIMEZONES file for more information
+$timezone = 'Same as Server'; // Set timezone. Read TIMEZONES file for more information
$default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the PHP iCalendar directory
$tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X)
@@ -41,7 +41,7 @@ $blacklisted_cals[] = ''; // list. This should be the exact calendar filenam
$blacklisted_cals[] = ''; // the parser will *not* parse any cal that is in this list (it will not be Web accessible)
// add more lines as necessary
-$list_webcals[] = ''; // Fill in between the quotes exact URL of a calendar that you wish
+$list_webcals[] = 'http://icalx.com/public/carlos/Halloween.ics'; // Fill in between the quotes exact URL of a calendar that you wish
$list_webcals[] = ''; // to show up in your calendar list. You must prefix the URL with http://
$list_webcals[] = ''; // or webcal:// and the filename should contain the .ics suffix
$list_webcals[] = ''; // $allow_webcals does *not* need to be "yes" for these to show up and work
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index a4a1045..f33ebdc 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -459,6 +459,8 @@ if ($parse_file) {
$data = $line[2];
if (preg_match("/^DTSTART/i", $field)) {
+ $zulu_time = false;
+ if (substr($data,-1) == 'Z') $zulu_time = true;
$data = ereg_replace('T', '', $data);
$data = ereg_replace('Z', '', $data);
if (preg_match("/^DTSTART;VALUE=DATE/i", $field)) {
@@ -469,7 +471,9 @@ if ($parse_file) {
$tz_tmp = explode('=', $field);
$tz_dtstart = $tz_tmp[1];
unset($tz_tmp);
- }
+ } elseif ($zulu_time) {
+ $tz_dtstart = 'GMT';
+ }
ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', $data, $regs);
$start_date = $regs[1] . $regs[2] . $regs[3];
@@ -500,6 +504,8 @@ if ($parse_file) {
}
} elseif (preg_match("/^DTEND/i", $field)) {
+ $zulu_time = false;
+ if (substr($data,-1) == 'Z') $zulu_time = true;
$data = ereg_replace('T', '', $data);
$data = ereg_replace('Z', '', $data);
if (preg_match("/^DTEND;VALUE=DATE/i", $field)) {
@@ -509,7 +515,10 @@ if ($parse_file) {
$tz_tmp = explode('=', $field);
$tz_dtend = $tz_tmp[1];
unset($tz_tmp);
+ } elseif ($zulu_time) {
+ $tz_dtend = 'GMT';
}
+
ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', $data, $regs);
$end_date = $regs[1] . $regs[2] . $regs[3];
$end_time = $regs[4] . $regs[5];

© 2014-2024 Faster IT GmbH | imprint | privacy policy