Closed (outdated)
Project:
Event
Version:
5.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
1 Jul 2005 at 00:44 UTC
Updated:
13 Apr 2018 at 20:57 UTC
Jump to comment: Most recent
Fresh install of Drupal 4.6.1 and the event module as of 25jun05. I have to disable error reporting to screen for the site. Errors still fill up the log
Windows 2003 Server, IIS 6.0
gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in D:\Inetpub\ap46\includes\common.inc on line 885.
Let me know if any more infomration is needed and what tests I can do.
Comments
Comment #1
jsloan commentedHere is what I found when dealing with this during an upgrade from 4.5 to 4.6. The upgrade does not create an ending date for converted event records. This will cause strange calendar displays and the gmdate() warning if your default time zone is negaive of GMT. The simple fix is to run the SQL query
UPDATE `event` SET `event_end` = `event_start`This problem also occurs when adding a new event. In the
event_nodeapi()function the code forcase 'validate':will use theformat_date()function for the$node->event_startand$node->event_end... again, if your default time zone is a negative value then this will generate the gmdate() warning. To avoid this I addedif ($node->status)to thecase 'validate':.I'll submit a patch if needed, but I'm not sure if this is the best way to fix this issue. It only happens with PHP on Windows, (see http://drupal.org/node/8212) so should we be careful to never pass negative numbers to
format_date()of should we add some data checking to theformat_date()function?Comment #2
benshell commentedI'm also getting this error when I try to submit a new event node:
warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in c:\files\web projects\drupalcvs\includes\common.inc on line 986
It is only when I have the date set to a negative number (i.e. GMT - 0700). I'm using a fresh install of the CVS versions of Drupal, event.module, and flexinode.
Comment #3
hunmonk commentedthis is actually a well-documented windows bug w/ timestamp handling. setting status to won't fix.
Comment #4
hotgazpacho commentedOK, so this raises the question: Why are negative timestamp values being passed to gmdate for events with start and end times well after January 1, 1970?
Not running Windows or upgrading to PHP 5.1 are not accetable answers. They do not address the real problem, which is why negative values are being passed to gmdate for events taking place wholly after the UNIX epoch.
Comment #5
drewish commentedhotgazpacho, look through the other gmdate() bugs. when you add a negative timezone offset to a timestamp of 0 you'll get a negative timestamp. if you want to do something, go track down the place where the 0 timestamps are originating.
Comment #6
owahab commentedComment #7
Anonymous (not verified) commentedChanging the priority because it is obviously not critical enough for patches to have been submitted and a critical bug open as long as this one is ridiculous. Jan 1st, 1970 is the epoch date for MS OS. BTW, I have installed with Apache on windows with no issue. Changing the status to postponed since no one is working the issue even though I agree with the original won't fix.
Comment #8
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.