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)
Sun, Feb 16, 11:13 PM
Unknown Object (File)
Sun, Feb 9, 3:43 AM
Unknown Object (File)
Sun, Feb 9, 3:43 AM
Unknown Object (File)
Sun, Feb 9, 3:43 AM
Unknown Object (File)
Sun, Feb 9, 3:43 AM
Unknown Object (File)
Thu, Feb 6, 9:45 PM
Unknown Object (File)
Jan 28 2025, 11:33 AM
Unknown Object (File)
Jan 24 2025, 8:05 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable