Date module version 5.x-1.2

Timezone set on server: EST (by typing date at terminal)

Site Configuration -- Date and Time
---------------------------------------
*Default time zone -- -0500
*Configurable time zones: Disabled

Configuration of Date field
--------------------------------
*This is a date field
*Widget: Happens with all three
*Not Required
*Not multiple values
*Granularity: Year, Month, Day, Hour, Minute, Second
*To Date: Optional (or never)
*Timezone handling: Site's Time Zone
*Advanced timezone options -- Site timezone: EST

When I save a node with a date field (using above settings), it alters the time entered to be equivalent to GMT when it saves to the database. Since I am in a -5 hr time zone, it adds 5 hours to the time. I'm not sure if it is supposed to do this when it saves to the database or not. This seems to display properly with the latest (head) version of the calendar module. (In other words the calendar module changes the date back 5 hours.) The problem occurs when you go back in and edit the node again. The From date is exactly the same as it is in the database, 5 hours greater than the original time entered. Saving it again will add an additional 5 hours. Each time you edit and save the event, 5 additional hours will be added to the event.

The To date with "select list" Widget also suffers from the same problem. The to Date with either the "Text Field with strtotime validation" or "Text Field with javascript pop-up calendar" widget has the additional problem of defaulting to the same date and time as the From date upon editing, no matter what was originally entered or saved in the database.

When Granularity is set to only m,d,y, I don't see this problem manifest because the time seems to always be set to 12AM.

Comments

karens’s picture

Status: Active » Fixed

Found and fixed in the latest commit. Thanks for the clues to the problem.

Anonymous’s picture

Status: Fixed » Closed (fixed)