->
set('timezone.user.configurable', 1
) ->
set('timezone.default', 'America/Los_Angeles'
) ->
save();
// Load the 'medium' date format, which is the default for node creation
// time, and override it. Since we are testing time zones with Daylight
// Saving Time, and need to future proof against changes to the zoneinfo
// database, we choose the 'I' format placeholder instead of a
// human-readable zone name. With 'I', a 1 means the date is in DST, and 0
// if not.
DateFormat::
load('medium'
) ->
setPattern('Y-m-d H:i I'
) ->
save();
// Create a user account and login.
$web_user =
$this->
drupalCreateUser();
$this->
drupalLogin($web_user);
// Create some nodes with different authored-on dates.
// Two dates in PST (winter time):
$date1 = '2007-03-09 21:00:00 -0800';
$date2 = '2007-03-11 01:00:00 -0800';
// One date in PDT (summer time):