I looked for, but couldn't find clarification of what the Date CCK field's 'timezone handling method' options mean and how they should be used.

Can anyone help please?

Comments

arlinsandbulte’s picture

Yes, I agree. There is no documentation about what the various time zone settings mean, what they do, how they affect the data, and when/where they should be used.

Places with time zone settings:

  • /admin/settings/date-time (Locale settings - Default time zone)
  • /user/%/edit (Locale settings - Default time zone)
  • In the date field settings: Time Zone Handling
    Available Options:
    • "Site's Time Zone"
    • "Date's Time Zone"
    • "User's Time Zone"
    • "UTC"
    • "No Time Zone Conversion"
arlinsandbulte’s picture

Version: 6.x-2.0-rc2 » 6.x-2.4
Assigned: Unassigned » arlinsandbulte
Category: support » task
Status: Active » Needs review

I have been fuddling around with the timezone settings & handling methods a little lately to better understand this.
Below is what I think I know so far. This is just a start. DON"T TAKE THIS AS GOSPEL YET! I am not 100% sure of everything said below.
Karen (or anyone): If you could, please read this and let me know if I am going in the right direction and if I have anything wrong (and I am sure I do).
Thanks.

Locale Settings at /admin/settings/date-time

Default time zone

Sets the default time zone for the website. Think of this setting as the time zone where the organization is based. When annonmyous users visit the site, time fields displayed for them will be converted to this time zone.

User-configurable time zones

Determines if individual users can set thier own default time zone. When the user is logged on, this effectively over-rides the above "Default time zone" setting.

First day of week:

Sets the desired first day of week. Mostly affects calendar grid displays, but also affects date-browser output when vieing dates by week. For most US/english sites, this should be set to Sunday. Monday is also frequently used in countries that follow the ISO 8601 date standard. Also, Saturday is common among Gulf Cooperation Council countries. (see http://en.wikipedia.org/wiki/Seven-day_week#Week_number for details)

Time Zone settings unique to each date field instance
at /admin/content/node-type/[machine_name_of_node-type]/fields/field_[machine_name_of_field]

Time zone handling

There are 5 different options for field Time zone handling:

  1. Site's time zone - When entering data into the field, the data entered is assumed to be in the site's time zone. When the data is saved to the database, it is converted to UTC. When retrieved from the database, the data is converted to the Site's time zone for annonymous users or the User's time zone for logged in users when User-configurable time zones is enabled.
  2. Date's time zone - With this option enabled, the date field adds a select box to explicitly specify the time zone for the date entered. 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.
  3. User's time zone - When entering data into the field, the data entered is assumed to be in the user's time zone. When the data is saved to the database, it is converted to UTC. When retrieved from the database, the data is converted to the Site's time zone for annonymous users or the User's time zone for logged in users when User-configurable time zones is enabled.
  4. UTC - When entering data into the field, the data entered is assumed to be in UTC time zone. When the data is saved to the database, it is converted to UTC (e.g. no conversion necessary). When retrieved from the database, the data is converted to the Site's time zone for annonymous users or the User's time zone for logged in users when User-configurable time zones is enabled.
  5. No time zone conversion - The date entered is not converted when saved to the database. When retrieved from the database, the data is NOT converted and is displayed exactly as entered.

Later, I could add some use cases/examples to better explain the options above.

rar’s picture

Thanks! Good info.

arlinsandbulte’s picture

Status: Needs review » Fixed

I added the info in #2 above to the docs here: http://drupal.org/node/767182
It may not be 100% correct, but at least it is more accessible to others now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.