This row in domain_conf.admin.inc destroys the numeric keys of the option array:

if ($action['#form']['#type'] == 'select') {
  $action['#form']['#options'] = array_merge(array(NULL => t('Use primary domain settings')), $action['#form']['#options']);
}

This makes assigning a different timezone impossible since the key in that option array is the numeric offset in seconds for the timezones.

I'm attaching a patch for this that replaces array_merge() with a plus.

Reference: http://se2.php.net/operators.array and http://goodold.se/blog/tech/danger-id-numbers-keys-php-arrays

Comments

agentrickard’s picture

Can we also use += here?

agentrickard’s picture

StatusFileSize
new1.04 KB

Actually, we can't, since the point of array_merge() was to keep the NULL option at the top of the select list.

This should work.

voxpelli’s picture

Of course - a last minute mistake - your patch looks good

agentrickard’s picture

Status: Needs review » Fixed

Excellent catch. I don't think this applies to the 5.x version, since the NULL element isn't in that.

Committed!

Status: Fixed » Closed (fixed)

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