I think the section on "Date's time zone" is wrong at http://drupal.org/node/1455578

I would edit the page myself but I don't know what the intended behavior is. The page says "When the date is saved to the database, it is not converted & the time zone information is saved with the date. When retrieved from the database, no conversion is performed and the date is displayed exactly as entered."
In fact it looks to me like some conversion is performed, but I don't understand the rationale behind the conversion. On my site I entered 18:30 for the start date of an event, but if I dump the data I see...

["value"]=> string(19) "2012-08-07 23:30:00"

Whereas if I set a date field to "No time zone conversion" and enter 18:30, I get...

["value"]=> string(19) "2012-08-07 18:30:00"

So it appears to me that the documentation is correct for the "No time zone conversion" section, but not the "Date's time zone" section.

Comments

coredumperror’s picture

Issue summary: View changes

I believe the problem here is that the Date code doesn't call the date_get_timezone_db() function properly (and the current version of that function, without my patch from comment #7 on #998076: Problem with timezone handling (caused by date_get_timezone_db returning only UTC) , doesn't work right anyway). Someone will need to go through the code to find all the places this function gets called and ensure that the $timezone parameter is always passed in when the $handling parameter is 'date'.

DamienMcKenna’s picture

Version: 7.x-2.5 » 7.x-2.x-dev
gisle’s picture

This is related to #998076: Problem with timezone handling (caused by date_get_timezone_db returning only UTC).

Date's handling of TZ is currently a mess, as behavior has changed over time. I think it will be a major effort to sort this out.

DamienMcKenna’s picture

Status: Active » Closed (won't fix)

Yeah, lets close this one.

gisle’s picture

A major overhaul of Date's time zone handling is now underway in a separate branch 7.x-3.x. For details, see parent issue: #3012904: Plan for overhaul of time zone handling.