Page MenuHomePhabricator

Render timezones in event reminder mail, and render them more nicely
ClosedPublic

Authored by epriestley on Apr 10 2017, 2:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 8:59 AM
Unknown Object (File)
Sun, Nov 24, 9:01 PM
Unknown Object (File)
Thu, Nov 21, 6:39 AM
Unknown Object (File)
Sun, Nov 17, 11:01 AM
Unknown Object (File)
Oct 28 2024, 3:17 PM
Unknown Object (File)
Oct 24 2024, 2:07 PM
Unknown Object (File)
Oct 14 2024, 8:32 AM
Unknown Object (File)
Oct 13 2024, 5:49 AM
Subscribers
None

Details

Summary

Fixes T12356.

  • In this mail, we currently render "6:00 AM". Instead, render "6:00 AM (PDT)" or similar. This is consistent with times in other modern Transaction mail.
  • Previously, we would render "UTC-7". Render "PDT" instead. For obscure zones with no known timezone abbreviation, fall back to "UTC-7".
Test Plan
  • Used bin/calendar notify --minutes X to trigger notifications, read email bodies.
  • Used this script to list all T values and checked them for sanity:
<?php

$now = new DateTime();

$locales = DateTimeZone::listIdentifiers();
foreach ($locales as $locale) {
  $zone = new DateTimeZone($locale);
  $now->setTimeZone($zone);

  printf(
    "%s (%s)\n",
    $locale,
    $now->format('T'));
}

Diff Detail

Repository
rP Phabricator
Branch
cal5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16362
Build 21762: Run Core Tests
Build 21761: arc lint + arc unit