3 final class PhabricatorLocalTimeTestCase
extends PhabricatorTestCase
{
5 protected function getPhabricatorTestCaseConfiguration() {
7 self
::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES
=> true,
11 public function testLocalTimeFormatting() {
12 $user = $this->generateNewTestUser();
13 $user->overrideTimezoneIdentifier('America/Los_Angeles');
15 $utc = $this->generateNewTestUser();
16 $utc->overrideTimezoneIdentifier('UTC');
19 'Jan 1 2000, 12:00 AM',
20 phabricator_datetime(946684800, $utc),
21 pht('Datetime formatting'));
24 phabricator_date(946684800, $utc),
25 pht('Date formatting'));
28 phabricator_time(946684800, $utc),
29 pht('Time formatting'));
32 'Dec 31 1999, 4:00 PM',
33 phabricator_datetime(946684800, $user),
38 phabricator_datetime(0, $user),
39 pht('Missing epoch should fail gracefully'));