|
From: Jo R. <jr...@ne...> - 2006-12-11 23:17:14
|
Vito, the reason that your recurring and non-recurring events are
different is because your ICS file has TZID on recurring events but
not on non-recurring events.
The second problem is putting a microsoft-proprietary format time
format in field that should be an IETF standard timezone format.
Yes, 2455 doesn't define which standard to use but a proprietary
format is unexpected.
I can provide you with a patch which parses that format properly, but
I don't know about long-term support in phpIcalendar. I would
discuss this concern with the maker of your calendar software or the
export utility.
Anyway, here is a patch to try. I haven't had a chance to test it,
but it should probably work.
diff -r1.37 date_functions.php
295,299c295,314
< $fields = explode("/",$data);
< $tz = array_pop($fields);
< $tmp = array_pop($fields);
< if (isset($tmp) && $tmp != "") $tz = "$tmp/$tz";
< return $tz;
---
> if (preg_match('/^[\w\-]+\/[\w\-]+$/', $data)) {
> $stdformat = $data;
> }
> else {
> $matches = array();
> if (preg_match('/^\/mozilla.org\/\w+\/([\w\-]+\/[\w
\-]+$)/', $data, $matches )) {
> $stdformat = $matches[1] . '/' . $matches[2];
> }
> elseif (preg_match('/^\(GMT([\+\-])(\d)(\d)\:\d+
\)/', $data, $matches)) {
> $operator = $matches[1];
> if( $matches[2] == '0' ) {
> $hour = $matches[3];
> }
> else {
> $hour = $matches[2] . $matches[3];
> }
> $stdformat = 'Etc/GMT' . $operator . $hour;
> }
> }
> return $stdformat;
On Dec 11, 2006, at 2:27 PM, Vito Laurenza wrote:
> Here you go.
>
> :::: Vito Laurenza
> :: Systems Administrator
> :: Advance Internet
> :: 201.793.1807
> :: vla...@ad...
>
>
> -----Original Message-----
> From: Jo Rhett [mailto:jr...@ne...]
> Sent: Monday, December 11, 2006 4:32 PM
> To: Vito Laurenza
> Cc: Jordan Lederman
> Subject: Re: [PHPiCalendar-DEV] Offer for compensation for
> squashing a timezone bug
>
> Please send me an example iCal file.
>
> Make me an iCal file with three entries, two normal and one
> recurring. Send it to me as an attachment.
>
> On Dec 5, 2006, at 1:06 PM, Vito Laurenza wrote:
>
>> I've cc'd my Director on this message and he'll be able to tell you
>> more about how we can arrange compensation.
>>
>> As for the issue, if you scroll all the way down to the bottom of
>> this message you'll see my original note to Chad and Jim. Also see
>> here: http://phpicalendar.net/forums/showpost.php?p=7992&postcount=4
>>
>> The issue basically boils down to this. If $timezone (in
>> config.inc.php) is set to "", recurring event times are OK and
>> regular event times are off. If $timezone is set to "US/Eastern"
>> or "(GMT-05:00) Eastern Time (US & Canada)" [as my calendar
>> program sets the TZID], recurring events are off and regular events
>> are OK.
>>
>> :::: Vito Laurenza
>> :: Systems Administrator
>> :: Advance Internet
>> :: 201.793.1807
>> :: vla...@ad...
>>
>>
>> -----Original Message-----
>> From: Jo Rhett [mailto:jr...@ne...]
>> Sent: Tuesday, December 05, 2006 3:59 PM
>> To: Vito Laurenza
>> Subject: Re: [PHPiCalendar-DEV] Offer for compensation for
>> squashing a timezone bug
>>
>> Whoops, got buried by late-night response on my real job last night.
>> Maybe tomorrow? Sorry.
>>
>> Can you summarize the issue real quick?
>>
>> What are you hoping to pay for this fix?
>>
>> On Dec 5, 2006, at 5:25 AM, Vito Laurenza wrote:
>>> Thanks Jo. Let me know what we can work out.
>>>
>>> :::: Vito Laurenza
>>> :: Systems Administrator
>>> :: Advance Internet
>>> :: 201.793.1807
>>> :: vla...@ad...
>>>
>>>
>>> -----Original Message-----
>>> From: Jo Rhett [mailto:jr...@ne...]
>>> Sent: Monday, December 04, 2006 5:17 PM
>>> To: PHPiCalendar Devel
>>> Cc: Vito Laurenza
>>> Subject: Re: [PHPiCalendar-DEV] Offer for compensation for
>>> squashing a timezone bug
>>>
>>> I can do it. I'll wrap my head around this problem tonight and
>>> decide what it's going to take to fix it.
>>>
>>> On Nov 30, 2006, at 8:39 AM, Jim Hu wrote:
>>>> Anyone able to help him? I don't know what he has in mind for
>>>> compensation, and don't know anything about him other than that he
>>>> has an urgent need for the fix.
>>>> =====================================
>>>> Jim Hu
>>>> Associate Professor
>>>> Dept. of Biochemistry and Biophysics
>>>> 2128 TAMU
>>>> Texas A&M Univ.
>>>> College Station, TX 77843-2128
>>>> 979-862-4054
>>>>
>>>>
>>>> Begin forwarded message:
>>>>
>>>>> From: "Vito Laurenza" <vla...@ad...>
>>>>> Date: November 30, 2006 10:36:00 AM CST
>>>>> To: jimhu <ji...@ta...>
>>>>> Subject: RE: PHPical
>>>>>
>>>>> Sure thing.
>>>>>
>>>>> :::: Vito Laurenza
>>>>> :: Systems Administrator
>>>>> :: Advance Internet
>>>>> :: 201.793.1807
>>>>> :: vla...@ad...
>>>>>
>>>>>
>>>>> From: Jim Hu [mailto:ji...@ta...]
>>>>> Sent: Thursday, November 30, 2006 11:34 AM
>>>>> To: Vito Laurenza
>>>>> Subject: Re: PHPical
>>>>>
>>>>> I don't have a consulting company, and since the reason I don't
>>>>> have time is a $600K federal grant, I doubt you'd want to pay that
>>>>> much! Would you like this offer relayed to the developer list?
>>>>>
>>>>>
>>>>> JH
>>>>> =====================================
>>>>> Jim Hu
>>>>> Associate Professor
>>>>> Dept. of Biochemistry and Biophysics
>>>>> 2128 TAMU
>>>>> Texas A&M Univ.
>>>>> College Station, TX 77843-2128
>>>>> 979-862-4054
>>>>>
>>>>>
>>>>> On Nov 30, 2006, at 9:32 AM, Vito Laurenza wrote:
>>>>>
>>>>>> If you have a consulting company or the likes, we can offer you
>>>>>> compensation for your time. Like I said earlier, we needed fixed
>>>>>> this yesterday.
>>>>>>
>>>>>> :::: Vito Laurenza
>>>>>> :: Systems Administrator
>>>>>> :: Advance Internet
>>>>>> :: 201.793.1807
>>>>>> :: vla...@ad...
>>>>>>
>>>>>>
>>>>>> From: Jim Hu [mailto:ji...@ta...]
>>>>>> Sent: Thursday, November 30, 2006 10:23 AM
>>>>>> To: Vito Laurenza
>>>>>> Subject: Re: PHPical
>>>>>>
>>>>>> Haven't had time yet.
>>>>>>
>>>>>> =====================================
>>>>>> Jim Hu
>>>>>> Associate Professor
>>>>>> Dept. of Biochemistry and Biophysics
>>>>>> 2128 TAMU
>>>>>> Texas A&M Univ.
>>>>>> College Station, TX 77843-2128
>>>>>> 979-862-4054
>>>>>>
>>>>>>
>>>>>> On Nov 30, 2006, at 9:18 AM, Vito Laurenza wrote:
>>>>>>
>>>>>>> Any luck?
>>>>>>>
>>>>>>> I also found an issue in day.php for which I've posted a
>>>>>>> patch on
>>>>>>> your forums.
>>>>>>>
>>>>>>> :::: Vito Laurenza
>>>>>>> :: Systems Administrator
>>>>>>> :: Advance Internet
>>>>>>> :: 201.793.1807
>>>>>>> :: vla...@ad...
>>>>>>>
>>>>>>>
>>>>>>> From: Jim Hu [mailto:ji...@ta...]
>>>>>>> Sent: Wednesday, November 29, 2006 9:17 AM
>>>>>>> To: Vito Laurenza
>>>>>>> Subject: Re: PHPical
>>>>>>>
>>>>>>> Ok, that's what I was afraid of. I'll have to dig into
>>>>>>> ical_parser.php.
>>>>>>>
>>>>>>>
>>>>>>> =====================================
>>>>>>> Jim Hu
>>>>>>> Associate Professor
>>>>>>> Dept. of Biochemistry and Biophysics
>>>>>>> 2128 TAMU
>>>>>>> Texas A&M Univ.
>>>>>>> College Station, TX 77843-2128
>>>>>>> 979-862-4054
>>>>>>>
>>>>>>>
>>>>>>> On Nov 29, 2006, at 7:37 AM, Vito Laurenza wrote:
>>>>>>>
>>>>>>>> Hi Jim,
>>>>>>>>
>>>>>>>> I did take a look at parse_tz() and I wrote a quick test based
>>>>>>>> on it:
>>>>>>>>
>>>>>>>> <?php
>>>>>>>> $data='"(GMT-05:00) Eastern Time (US & Canada)"';
>>>>>>>> $fields = explode("/",$data);
>>>>>>>> $tz = array_pop($fields);
>>>>>>>> $tmp = array_pop($fields);
>>>>>>>> if (isset($tmp) && $tmp != "") $tz = "$tmp/$tz";
>>>>>>>> print_r($data);
>>>>>>>> echo "<BR>\n";
>>>>>>>> print_r($fields);
>>>>>>>> echo "<BR>\n";
>>>>>>>> print_r($tmp);
>>>>>>>> echo "<BR>\n";
>>>>>>>> print_r($tz);
>>>>>>>> ?>
>>>>>>>>
>>>>>>>> Since there are no '/' in $data, $tz ends up with the same
>>>>>>>> value
>>>>>>>> as $data.
>>>>>>>>
>>>>>>>> It's not so much that parse_tz() doesn't work, but that when I
>>>>>>>> set $timezone in config.inc.php, any embedded TZID in a VEVENT
>>>>>>>> seems to be ignored. If I set $timezone to null, then the
>>>>>>>> embedded TZID is parsed properly. I wish I could show you our
>>>>>>>> calendar for an example, but it's not accessible from outsite
>>>>>>>> our network.
>>>>>>>>
>>>>>>>> :::: Vito Laurenza
>>>>>>>> :: Systems Administrator
>>>>>>>> :: Advance Internet
>>>>>>>> :: 201.793.1807
>>>>>>>> :: vla...@ad...
>>>>>>>> ________________________________
>>>>>>>>
>>>>>>>> From: Jim Hu [mailto:ji...@ta...]
>>>>>>>> Sent: Wednesday, November 29, 2006 8:30 AM
>>>>>>>> To: Vito Laurenza
>>>>>>>> Cc: chad
>>>>>>>> Subject: Re: PHPical
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Vito,
>>>>>>>>
>>>>>>>> I'll try to take a look at your sample events on the bbs when I
>>>>>>>> get time (I'm at a conference for a code project that actually
>>>>>>>> pays the bills, so that gets priority, I'm afraid). The change
>>>>>>>> in 2.23 that was supposed to fix this is in date_functions.php
>>>>>>>> and it's the addition of a function called parse_tz:
>>>>>>>>
>>>>>>>> function parse_tz($data){
>>>>>>>> $fields = explode("/",$data);
>>>>>>>> $tz = array_pop($fields);
>>>>>>>> $tmp = array_pop($fields);
>>>>>>>> if (isset($tmp) && $tmp != "") $tz = "$tmp/$tz";
>>>>>>>> return $tz;
>>>>>>>> }
>>>>>>>>
>>>>>>>> If things are still not working for you, it would be useful for
>>>>>>>> me if you could put some diagnostics in this code block to
>>>>>>>> determine whether it's being called, and what it thinks tz is
>>>>>>>> before it returns.
>>>>>>>>
>>>>>>>> Jim
>>>>>>>>
>>>>>>>> =====================================
>>>>>>>>
>>>>>>>> Jim Hu
>>>>>>>>
>>>>>>>> Associate Professor
>>>>>>>>
>>>>>>>> Dept. of Biochemistry and Biophysics
>>>>>>>>
>>>>>>>> 2128 TAMU
>>>>>>>>
>>>>>>>> Texas A&M Univ.
>>>>>>>>
>>>>>>>> College Station, TX 77843-2128
>>>>>>>>
>>>>>>>> 979-862-4054
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Nov 29, 2006, at 7:17 AM, Vito Laurenza wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks for the response Chad.
>>>>>>>>
>>>>>>>> So is the correct thing to set my $timezone = '"(GMT-05:00)
>>>>>>>> Eastern Time (US & Canada)"'; and cross my fingers?
>>>>>>>>
>>>>>>>> :::: Vito Laurenza
>>>>>>>> :: Systems Administrator
>>>>>>>> :: Advance Internet
>>>>>>>> :: 201.793.1807
>>>>>>>> :: vla...@ad...
>>>>>>>>
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Chad Little [mailto:ch...@ch...]
>>>>>>>> Sent: Tuesday, November 28, 2006 4:17 PM
>>>>>>>> To: Vito Laurenza
>>>>>>>> Cc: jimhu
>>>>>>>> Subject: Re: PHPical
>>>>>>>>
>>>>>>>> My guess is since your event is in '"(GMT-05:00) Eastern Time
>>>>>>>> (US &
>>>>>>>> Canada)"' but your setting your timezone to 'US/Eastern'.
>>>>>>>> Without a
>>>>>>>> match, we go to Zulu time, since the event ends in 'Z'. If that
>>>>>>>> doesn't work, I can't think of anything else. We're displaying
>>>>>>>> the
>>>>>>>> results as we expect.
>>>>>>>>
>>>>>>>> -Chad
>>>>>>>>
>>>>>>>> On Nov 28, 2006, at 12:41 PM, Vito Laurenza wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hello Chad and Jim,
>>>>>>>>
>>>>>>>> As you are both aware, there is an issue in phpical where a
>>>>>>>> VEVENT
>>>>>>>> which contains recurrence information will not be displayed
>>>>>>>> with
>>>>>>>> the correct time in phpical. We are very interested in getting
>>>>>>>> this to work for us and would be happy to offer an incentive to
>>>>>>>> expedite a fix for this issue. We needed this fixed like
>>>>>>>> yesterday. ;)
>>>>>>>>
>>>>>>>> We are currently running PHP 4.3.9, PHPiCalendar 2.22, on a
>>>>>>>> CentOS4.4 (RHEL4 clone) box. I have also put into place the
>>>>>>>> newest
>>>>>>>> versions of functions/date_functions.php and functions/
>>>>>>>> ical_parser.php from your 2.23rc1 sourcefource source.
>>>>>>>>
>>>>>>>> Attached is a sample VEVENT with non-standard TZID. I have
>>>>>>>> already
>>>>>>>> added to functions/timezones.php the lines:
>>>>>>>> $tz_array['(GMT-05:00) Eastern Time (US & Canada)'] = array
>>>>>>>> ('-0500', '-0400');
>>>>>>>> $tz_array['"(GMT-05:00) Eastern Time (US & Canada)"'] = array
>>>>>>>> ('-0500', '-0400');
>>>>>>>>
>>>>>>>> (See my post on your forums for more samples: http://
>>>>>>>> phpicalendar.net/forums/showpost.php?p=7992&postcount=4)
>>>>>>>>
>>>>>>>> Here's what I see. If I set $timezone=''; in config.inc.php,
>>>>>>>> then
>>>>>>>> recurring events look fine, but normal events are at +0000.
>>>>>>>> If I
>>>>>>>> set $timezone='US/Eastern'; in config.inc.php, then recurring
>>>>>>>> events are wrong and normal events are fine.
>>>>>>>>
>>>>>>>> If I'm just doing something wrong, then please excuse the
>>>>>>>> unnecessary email, but I'd appreciate it if you could let me
>>>>>>>> know
>>>>>>>> what it is that I've screwed up. If not, please let me know
>>>>>>>> how/
>>>>>>>> when we can get this working and how we can compensate you for
>>>>>>>> professional services.
>>>>>>>>
>>>>>>>> :::: Vito Laurenza
>>>>>>>> :: Systems Administrator
>>>>>>>> :: Advance Internet
>>>>>>>> :: 201.793.1807
>>>>>>>> :: vla...@ad...
>>>>>>>> <recurring.txt>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> ---
>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>> Join SourceForge.net's Techsay panel and you'll get the chance to
>>>> share your
>>>> opinions on IT & business topics through brief surveys - and earn
>>>> cash
>>>> http://www.techsay.com/default.php?
>>>> page=join.php&p=sourceforge&CID=DEVDEV
>>>> _______________________________________________
>>>> Phpicalendar-devel mailing list
>>>> Php...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel
>>>
>>> --
>>> Jo Rhett
>>> Net Consonance : consonant endings by net philanthropy, open source
>>> and other randomness
>>>
>>>
>>>
>>
>> --
>> Jo Rhett
>> Net Consonance : consonant endings by net philanthropy, open source
>> and other randomness
>>
>>
>>
>
> --
> Jo Rhett
> Net Consonance : consonant endings by net philanthropy, open source
> and other randomness
>
>
>
|