My drupal 6.14 installation is showing two October 31, 2009 in the month view and the link to the next month shows Dec not Nov. (see attachment 2009-10.jpg). If I force 2009-11 via the url it shows October again but with only two 31st (no other date) (see attachment 2009-11). In the year view it shows two Octobers, one with two day 31s and another with only 30 days. (see attachment 2009-11).

I tried clearing system and view caches, removed calendar and re-installed, but no avail. All modules are up tp date running on Drupal-6.14. Problem can be seen in Drupal-6.13 as well. Any ideas anyone?

CommentFileSizeAuthor
#6 date.patch2.62 KBJody Lynn
2009-11.jpg94.35 KBebremer
2009-10.jpg118.73 KBebremer
year.jpg431.98 KBebremer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ebremer’s picture

BTW, I'm running RHEL 5.X with php-5.1.6-23.2.el5_3

arlinsandbulte’s picture

I suspect that the problem is mostly with PHP.
If possible, the best option is to upgrade your PHP to 5.2.x. I am having good luck with 5.2.9 right now.

If you cannot upgrade your PHP version, you should enable the Date PHP4 module. This module is required for PHP versions less than 5.2. From the Date documentation:

Date PHP4: Emulate PHP 5.2 date functions in PHP 4.x, PHP 5.0, and PHP 5.1. Required when using the Date API with PHP versions less than PHP 5.2.

ebremer’s picture

I have Date PHP4 module enabled already. Been so since the beginning. I do have a private drupal server which is running correctly, but that one is running PHP 5.2.X. Looks like I will have to do the same for my php 5.1 server since Date PHP4 is not working. I was just trying to avoid breaking out of the standard RHEL 5.X install.

Cayenne’s picture

I found by trial and error that setting my server to the local timezone (I am trapped in PHP 5.1) and then default PHP Timezone = TRUE in Date4 makes this go away.

ebremer’s picture

Thanks so much for the info. I had updated to PHP 5.2.X already to fix the problem, but you never know when your 5.1 fix will come in handy. :-)

Jody Lynn’s picture

Status: Active » Needs review
FileSize
2.62 KB

Cayenne's fix worked for me. Not only did I have 2 October 31sts, my calendar refused to go to November at all. After 5 hours of debugging it turned out that there is an obscured settings page for Date PHP 4 settings (obscured because the menu weight was set to 6, putting it out of alphabetical order), which defaults to not using the server timezone (although its description seems to imply it should default to using the server timezone). Once I switched it to use the server timezone, my problems were gone.

This patch puts the settings page back into alphabetical order, fixes the code for the settings page, and changes the default value to TRUE.

Gribnif’s picture

This is a duplicate of #586950: October 31, 2009 appears twice in month calendar, which I have just closed.

The suggested fix also works for me. (I'm stuck using PHP 5.1.6 on my test box.) And I agree that @Jody Lynn's patch looks like a big improvement.

Jody Lynn’s picture

Project: Calendar » Date
Version: 6.x-2.2 » 6.x-2.4

Woops, yes, this is a date issue that hurts the calendar.

emdalton’s picture

Thank you! That fixed it for us, too.

We hope to have PHP 5.2 on our production server by January, but right now we're stuck, because the server uses RedHat Enterprise Linux, and that only has 5.1 (apparently).

naybliss’s picture

I'm using PHP 5.2.5 (and can't easily upgrade the rest of the way) so I'm not sure the PHP4 module will be an improvement. Can anyone confirm that they can use 5.2.x with x<6 and get this working right?

Gribnif’s picture

@naybliss: I'm pretty sure PHP 5.2.6 already includes all of the functions emulated by the date_php4 module, so you should not need it. If you are having problems with months having the wrong number of days, the problem probably lies elsewhere.

arlinsandbulte’s picture

I had some of these same problems with PHP 5.2.6
When my server was upgraded to 5.2.9 problems went away....

arlinsandbulte’s picture

Status: Needs review » Closed (duplicate)

This is related to all the other PHP4 issues in Date...
Marking as duplicate