View previous topic :: View next topic |
Author |
Message |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Wed Oct 23, 2002 8:23 pm Post subject: Calendar Bug? October 27th on both Sunday and Monday |
|
|
I haven't looked into the code much yet, but my calendar shows October 27th on Sunday and Monday (with the day of the week starting Sunday or Monday, no difference).
After looking at a couple dozen blogs it appears that VERY few people use the calendar... but Michal Park who posted a previous calendar bug (http://weblog.michaelpark.net/) has the same bug visible on his blog.
Anyone look into this yet? I'm assuming it isn't just something I did since I see it on other blogs as well. |
|
Back to top |
|
 |
epolady
Joined: 30 Jul 2002 Posts: 800 Location: Texas
|
Posted: Wed Oct 23, 2002 8:34 pm Post subject: |
|
|
i have that too lol...interesting |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Wed Oct 23, 2002 9:16 pm Post subject: |
|
|
Hi,
I just test this on my b2 0.6 release test server and can not reproduce the issue. I tested with start of week set to sonday and monday, both were fine.
Are both of you using the 0.6 release?
Have you made any changes to b2calendar.php?
michael e |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Wed Oct 23, 2002 9:28 pm Post subject: |
|
|
I'm using 0.6, I didn't make any changes to b2calendar.php other than telling it to use a 2 character day abbreviation. I just downloaded the 0.6 release again from sourceforge and uploaded a clean, untouched b2calendar.php and it displayed the same problem. |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Wed Oct 23, 2002 9:33 pm Post subject: |
|
|
Hi,
What is your host (windows, linux ....)?
michael e |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Wed Oct 23, 2002 9:55 pm Post subject: |
|
|
alex_t_king,
just to make sure we were on the same "page" I too downloaded a fresh copy and installed it on my server. (That is execpt for the index.php page and the b2config.php.) I do not see this issue.
Do either of you have an external link to your sites?
michael e |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Wed Oct 23, 2002 10:38 pm Post subject: |
|
|
I wasn't 100% sure, so I checked with netcraft.com
Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g PHP/4.2.2 on Linux. |
|
Back to top |
|
 |
epolady
Joined: 30 Jul 2002 Posts: 800 Location: Texas
|
Posted: Wed Oct 23, 2002 10:59 pm Post subject: |
|
|
the only thing i've ever done with the calendar is change the CSS and the abbreviation for the days. My host is running *nix and Apache. Supporting PHP 4.1 (mysql version 3.23 if that matters).
Last edited by epolady on Wed Nov 20, 2002 9:42 pm; edited 2 times in total |
|
Back to top |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Oct 23, 2002 11:53 pm Post subject: |
|
|
By any chance, is October 27th the day when the clocks are set to winter time?
It might explain the problem. |
|
Back to top |
|
 |
epolady
Joined: 30 Jul 2002 Posts: 800 Location: Texas
|
Posted: Wed Oct 23, 2002 11:59 pm Post subject: |
|
|
Ah...that is daylight savings time weekend, but I don't get why it has the 27th as Sunday & Monday |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Thu Oct 24, 2002 12:08 am Post subject: |
|
|
I get it... the timestamp is off by an hour when it is checked, so it still thinks it is the previous day. What a nasty bug - I will leave this one to a more skilled programmer than me. |
|
Back to top |
|
 |
Gadget Girl
Joined: 25 Jan 2002 Posts: 305 Location: Virginia
|
Posted: Thu Oct 24, 2002 2:58 am Post subject: |
|
|
Yup, that's the weekend, Michel and as we change at 2 a.m., b2 doesn't know how to split it. Weird that it confused the program!
I think I will put in the calendar after that weekend.
Sara |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Thu Oct 24, 2002 3:10 am Post subject: Solution (my hack, seems pretty clean) |
|
|
-- post deleted --
use the fix that macshack posted later in this thread.
Last edited by alex_t_king on Tue Oct 29, 2002 2:06 am; edited 1 time in total |
|
Back to top |
|
 |
alex_t_king
Joined: 09 Oct 2002 Posts: 194
|
Posted: Thu Oct 24, 2002 3:19 am Post subject: tested |
|
|
I added a post timestamp'ed in september and when I went to the september archive... all 30 days were there as expected, maybe the fix works  |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Thu Oct 24, 2002 4:07 am Post subject: |
|
|
This is a Daylight Savings time bug.
The fix to correct this is to shift the time start and stop by one hour (the most that can be off) for the "day" calculation and display purpose only. Posts time are not affected. Thus a post at 00:00:01 on the first is correctly handled or on the 31 at 23:59:59. Additionally, April 2003 behaves as expected (spring jump ahead.)
Code: |
line 89
$calendarfirst = $calendarblah['start']+1+3600;
line 91
$calendarfirst = $calendarblah['end']-604799+3600;
|
CVS will be updated.
A special thanks to alex_t_king for your assistance in isolating the nasty.
Michael e |
|
Back to top |
|
 |
|