'date/time/datetime picker shortcuts work in the current time zone.
Refs #20663.
This test case is fairly tricky, it relies on selenium still running the browser
in the default time zone "America/Chicago" despite `override_settings` changing
the time zone to "Asia/Singapore".'

def test_date_time_picker_shortcuts(self):

    self.admin_login(username='super', password='secret', login_url='/')
    error_margin = timedelta(seconds=10)
    tz = pytz.timezone('America/Chicago')
    utc_now = datetime.now(pytz.utc)
    tz_yesterday = (utc_now - timedelta(days=1)).astimezone(tz).tzname()
    tz_tomorrow = (utc_now + timedelta(days=1)).astimezone(tz).tzname()
    if (tz_yesterday != tz_tomorrow):
        error_margin += timedelta(hours=1)
    now = datetime.now()
    self.selenium.get((self.live_server_url + reverse('admin:admin_widgets_member_add')))
    self.selenium.find_element_by_id('id_name').send_keys('test')
    shortcuts = self.selenium.find_elements_by_css_selector('.field-birthdate    .datetimeshortcuts')
    for shortcut in shortcuts:
        shortcut.find_element_by_tag_name('a').click()
    self.selenium.find_elements_by_css_selector('.field-birthdate    .timezonewarning')
    self.selenium.find_element_by_tag_name('form').submit()
    self.wait_page_loaded()
    member = Member.objects.get(name='test')
    self.assertGreater(member.birthdate, (now - error_margin))
    self.assertLess(member.birthdate, (now + error_margin))
