PEAK XOOPS - April shows all-day events twice HACK in englishin japanese

April shows all-day events twice HACK

List posts in the topic

normal April shows all-day events twice HACK

msg# 1.2.1
depth:
2
Previous post - Next post | Parent - Children.1 .2 | Posted on 2004/8/30 16:01
AZNative  一等兵 From: Phoenix, Arizona, USA  Posts: 12
You might experience an issue with all-day events for the month of April while in full month view. The all-day events might show up on two days. This is caused by the way the calendar is rendered. When each month is rendered on the calendar, it usesthe first day of the month, in this case, April 1. For example, April 1 + 1. April 1 + 2, April 1 + 3 and so on. Summer time begins within the first week of April, meaning that the first few days of April use winter time while the rest of April uses summer time. Since we're keying off of the first day in April, all the days end up using winter time. Obviously, this is incorrect as we should check each day independently for the change in summer time / winter time.

To solve the problem, open up piCal.php and do a search for

$now_unixtime = $mtop_unixtime + ( $date - 1 ) * 86400 ;

You should only find one occurance of this line somewhere around line number 1030. Sorry, my file is so hacked I can't give you exact line numbers.

Anyway, simply remove the line above and replace it with

$now_unixtime  = mktime(0,0,0, $this->month, $date, $this->year) ;
Votes:2 Average:10.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!