Closed (won't fix)
Project:
Date
Version:
6.x-2.x-dev
Component:
Date Timezone
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2012 at 02:50 UTC
Updated:
26 Oct 2018 at 02:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bkat commentedAfter some digging around I have made some changes that appear to be working for me. I believe the problem lies in date_elements.inc in the function date_local_date.
According to the date documentation, when timezone handling is date, the stored values are not converted to UTC. So what happens in _date_widget. date_local_date was doing conversions between UTC, the system timezone, and the dates timezone.
Basically it was reading the 12:00 from database and converting from system timezone (America/Chicago) which is 4 hours behind UTC on the date in question. This converted the date object to be 16:00 with the timezone America/Chicago. It then set the date timezone (America/New_York) which shifted the time to 17:00.
My included patch basically uses the date's timezone instead of the database timezone if timezone handling is set to date.
Comment #2
damienmckennaUnfortunately the Drupal 6 version of the Date module is no longer supported. That said, we appreciate that you took time to work on this issue. Should this request still be relevant for Drupal 7 please feel free to reopen it. Thank you.