After installing event.module on Drupal 4.6, but I'm getting these messages on every page:

warning: gmmktime(): Windows does not support negative values for this function in D:\drupal-4.6.0\modules\event\event.module on line 715.

warning: gmmktime(): Windows does not support negative values for this function in D:\drupal-4.6.0\modules\event\event.module on line 716.

warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in D:\drupal-4.6.0\modules\event\event.module on line 935.

Do you have any idea of what's going on ??
thanks

Matteo

Comments

crunchywelch’s picture

Assigned: Unassigned » crunchywelch

For some reason a negative timestamp value for a node is being sent to gmmktime, and windows does not support negative tiestamps (prior to January 1, 1970). Can you see if you have any timestamp values in your event table that are less than 0?

matteo’s picture

It seems to be an unresolved bug on Windows:

http://bugs.php.net/bug.php?id=22620

Normally you don't see the message unless you look at the log.

gmmktime(0,0,0,1,1,1970); which shouldreturn 0 but does not [unless you are in GMT]!!!

Probably, a different piece of code should be run in order to avoid the problem.

Matteo

crunchywelch’s picture

Well, there should never really be a negative timestamp value. Can you confirm the timestamp values in the event table? Do you have any event entries in the event table?

matteo’s picture

I have some events, but it seems problem occurs only when you enable event calendar block.
I have some published events.
when I disable that block, all works fine.

Matteo

aaron’s picture

Version: » 4.6.x-1.x-dev

I'm getting similar errors too. A fresh install, it's after I enabled the events module, the flexinode module, created a new node type for "event" that uses the event calendar, and create content/event. On that page, I get 10 identical errors that say "warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\...\includes\common.inc on line 888."

Thanks,
Aaron

Culture Fix Web Identity & Design
Digital Folk Art (my blog)

bonobo’s picture

When I go to create a content type that can also be an event via the event module, I'm getting the same error as Aaron -- warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\...\includes\common.inc on line 888.

The error messages go away when I enable "configurable time zones" in the "date" section of admin/settings

With configurable time zones disabled, I get the error with and without the event calendar block; when I enable configurable time zones, the errors return.

bonobo’s picture

As follow up to #6: the error message in #'s 5 and 6 reappears when the "Event time zone display:" is set to use (at
admin/settings/event) the sitewide time zone.

The error message disappears when the "Event time zone display:" setting is changed to any other setting.

Running a clean install of 4.6.3 and event module.

drewish’s picture

Status: Active » Closed (duplicate)

This is another aspect of the problems with event_validate_form_date():
http://drupal.org/node/31193 - start: 1970-01-01
http://drupal.org/node/38136 - event_validate_form_date() is still broken in CVS

I'm going to mark it as a duplicate (even though this was the original) as most pertinent comments were left on issue #31193.