1
kjs222
PiCal all day event difficulty
  • 2004/1/22 14:53

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


[edited]

I know others have had this problem with piCal, so I'm hoping that other piCal users might have solved it.


=========================================

Daily Events Difficulty
First, thank you everyone involved for your work on this module. My clients have been very happy to see it; even with the "beta" status.

The issue at hand is that an all-day event is added, but it ends up being duplicated on either the next day, or both the next day and current day (on month view).

NOTE: This issue is the exact same for .5 and .6 versions... I checked.

See the problem...


Particularly, see item...


So, this appears to be a single post on the calendar. The properties is that it recurs every year. In this case, it's an all-day event without specified date-time.

My intention is to find some modification of the PHP such that:

A) When all-day event is submitted, it doesn't duplicate the event on the original date
B) When all-day event is recurred, it doesn't span two days no matter what time-zone it is in. Currently the "first instance" of the recurrance appears to have the correct date-span, but the recurring events seem to overlap to the next day.

This is high-priority for this site.

For A)
- I believe there is an entry in the database for each occurrence of a recurring event... correct? In which case the problem is that when a new all-day recurring event is submitted for some reason the first occurrence is slightly different than subsequent occurrences, and that the algorithm for determining the first recurrence date must be slightly out-of-whack (possibly based on differences in time-zone, eg. because the person's time-zone is slightly before server's, therefore the "next" occurance of a yearly recurring event is today at 5:00... but really, that's a problem, not an excuse).

For B)
- I don't want to play-around with the datetime string... all I want to do is modify the handler of the all-day event object (if such an object exists) such that whenever these events are analyzed they are treated strictly as single-day events.

So, again, I appreciate that this is only beta. I am quite willing to do some of the hacking myself and share the result with the community; the thing I'd really like is for someone who's worked on this to:

- give me some initial feedback on my first conclusions
- let me know if I'm barking up the right trees,
- let me know if they have a quick solution, and
- let me know where a good place to start hacking would be.

Many thanks, and I look forward to continued use of this well-constructed module. I must admit - I'll take solidarity in the module over more features any day, but your future feature set does look inviting.

Thanks in advance,
Keith

2
kjs222
Re: PiCal all day event difficulty
  • 2004/1/22 16:55

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


As feeble as it seems, I have tried to navigate through www.xoopscube.jp and found this thread:

http://www.xoopscube.jp/modules/newbb/viewtopic.php?topic_id=2568&forum=17#forumpost13747

It looks like it might deal with the issue I am discussing... but the online translators don't do a good job... can anyone translate and tell me if this could solve my problem?

Thanks,
Keith

3
kjs222
Re: PiCal all day event difficulty
  • 2004/1/22 17:02

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


One more piece of information; the problem only happens for months after April... odd.

4
kjs222
Re: PiCal all day event difficulty
  • 2004/1/22 18:00

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


Well, I finally banged my head on this long enough to figure out the bug:

(I am referring to piCal .60... it is likely the same lines exist and need editing in .50 as well. You can find them by searching for the origional line in the piCal.php code).

I have had to break up the solution into seperate posts due to bb post error (I think it's a Safari/mac bug)

5
kjs222
Re: PiCal all day event difficulty
  • 2004/1/22 18:03

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


FIX #1
piCal.php-3561

Origional:
if( $start <= $event->start ) continue;


Modified:
if( $start <= $event->start+150000 ) continue;


This fixes the problem where on all day events the first day has two entries (one for the origional entry, one for the first recursion).


FIX #2

piCal.php-3488

Origional:
$duration $event->end $event->start ;


Modified:

if ($event->allday) $duration=1;
else $duration = $event->end - $event->start;


This fixes the problem where all-day events span two days when recurrant on yearly basis.



Please note that for both fixes above they only effect yearly recursion. Very likely monthly and daily recursion have the exact same problem. I'm sure GIJOE and others familiar with the code will quickly see where else this fix is needed. I hope the change is quickly implemented into the module and a new release follows shortly.

Happy Xoopsing,
Keith

6
Anonymous
Re: PiCal all day event difficulty
  • 2004/4/20 6:34

  • Anonymous

  • Posts: 0

  • Since:


I'm wondering if this is a bug.

My timezone and server timezone are both set to -7 in the preferences.

I add a recurring event 9 times starting April 26 from 19:00 - 21:00 (2 hours).

In April, the time shows correctly, but for May onward, it shows 20:00 - 22:00. Then, in November, it goes back to showing 19:00 - 21:00.

Even more strange is if I click to edit the May event, the time shows up as 19:00 - 21:00, but viewing it shows 20:00 - 22:00. If I check the value in the database, the unix time stamp converts to the 20:00 - 22:00 so it is being stored in the DB incorrectly.

Nonetheless, the one hour difference from May - November almost coincides with daylight savings time. Clocks move forward in April and back in October. I'm wondering if there is some code buried in there that is incorrectly and automatically adjusting for Daylight Savings time? I jsut can't seem to find it.

Login

Who's Online

259 user(s) are online (163 user(s) are browsing Support Forums)


Members: 0


Guests: 259


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits