Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger 2022114 #40492

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/lib/DateTimeFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public function testFormatDate($timestamp, $expected) {

public function formatDateTimeData() {
return [
[1350129205, null, 'October 13, 2012 at 11:53:25 AM UTC'],
[1350129205, new \DateTimeZone('Europe/Berlin'), 'October 13, 2012 at 1:53:25 PM GMT+2'],
[1350129205, null, 'October 13, 2012, 11:53:25 AM UTC'],
[1350129205, new \DateTimeZone('Europe/Berlin'), 'October 13, 2012, 1:53:25 PM GMT+2'],
];
}

Expand Down
16 changes: 8 additions & 8 deletions tests/lib/L10N/L10nTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,34 +90,34 @@ public function testCzechPluralTranslations() {
public function localizationData() {
return [
// timestamp as string
['February 13, 2009 at 11:31:30 PM UTC', 'en', 'datetime', '1234567890'],
['13. Februar 2009 um 23:31:30 UTC', 'de', 'datetime', '1234567890'],
['February 13, 2009, 11:31:30 PM UTC', 'en', 'datetime', '1234567890'],
['13. Februar 2009, 23:31:30 UTC', 'de', 'datetime', '1234567890'],
['February 13, 2009', 'en', 'date', '1234567890'],
['13. Februar 2009', 'de', 'date', '1234567890'],
['11:31:30 PM UTC', 'en', 'time', '1234567890'],
['23:31:30 UTC', 'de', 'time', '1234567890'],

// timestamp as int
['February 13, 2009 at 11:31:30 PM UTC', 'en', 'datetime', 1234567890],
['13. Februar 2009 um 23:31:30 UTC', 'de', 'datetime', 1234567890],
['February 13, 2009, 11:31:30 PM UTC', 'en', 'datetime', 1234567890],
['13. Februar 2009, 23:31:30 UTC', 'de', 'datetime', 1234567890],
['February 13, 2009', 'en', 'date', 1234567890],
['13. Februar 2009', 'de', 'date', 1234567890],
['11:31:30 PM UTC', 'en', 'time', 1234567890],
['23:31:30 UTC', 'de', 'time', 1234567890],

// DateTime object
['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'datetime', new DateTime('@1234567890')],
['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'datetime', new DateTime('@1234567890')],
['February 13, 2009, 11:31:30 PM GMT+0', 'en', 'datetime', new DateTime('@1234567890')],
['13. Februar 2009, 23:31:30 GMT+0', 'de', 'datetime', new DateTime('@1234567890')],
['February 13, 2009', 'en', 'date', new DateTime('@1234567890')],
['13. Februar 2009', 'de', 'date', new DateTime('@1234567890')],
['11:31:30 PM GMT+0', 'en', 'time', new DateTime('@1234567890')],
['23:31:30 GMT+0', 'de', 'time', new DateTime('@1234567890')],

// en_GB
['13 February 2009 at 23:31:30 GMT+0', 'en_GB', 'datetime', new DateTime('@1234567890')],
['13 February 2009, 23:31:30 GMT+0', 'en_GB', 'datetime', new DateTime('@1234567890')],
['13 February 2009', 'en_GB', 'date', new DateTime('@1234567890')],
['23:31:30 GMT+0', 'en_GB', 'time', new DateTime('@1234567890')],
['13 February 2009 at 23:31:30 GMT+0', 'en-GB', 'datetime', new DateTime('@1234567890')],
['13 February 2009, 23:31:30 GMT+0', 'en-GB', 'datetime', new DateTime('@1234567890')],
['13 February 2009', 'en-GB', 'date', new DateTime('@1234567890')],
['23:31:30 GMT+0', 'en-GB', 'time', new DateTime('@1234567890')],
];
Expand Down
16 changes: 8 additions & 8 deletions tests/lib/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function testFormatDate() {
\date_default_timezone_set("UTC");

$result = OC_Util::formatDate(1350129205);
$expected = 'October 13, 2012 at 11:53:25 AM UTC';
$expected = 'October 13, 2012, 11:53:25 AM UTC';
$this->assertEquals($expected, $result);

$result = OC_Util::formatDate(1102831200, true);
Expand All @@ -86,7 +86,7 @@ public function testFormatDateWithTZ() {
\date_default_timezone_set("UTC");

$result = OC_Util::formatDate(1350129205, false, 'Europe/Berlin');
$expected = 'October 13, 2012 at 1:53:25 PM GMT+2';
$expected = 'October 13, 2012, 1:53:25 PM GMT+2';
$this->assertEquals($expected, $result);
}

Expand All @@ -100,12 +100,12 @@ public function testFormatDateWithInvalidTZ() {

public function formatDateWithTZFromSessionData() {
return [
[3, 'October 13, 2012 at 2:53:25 PM GMT+3', 'Etc/GMT-3'],
[15, 'October 13, 2012 at 11:53:25 AM UTC', 'UTC'],
[-13, 'October 13, 2012 at 11:53:25 AM UTC', 'UTC'],
[9.5, 'October 13, 2012 at 9:23:25 PM GMT+9:30', 'Australia/Darwin'],
[-4.5, 'October 13, 2012 at 7:23:25 AM GMT-4:30', 'America/Caracas'],
[15.5, 'October 13, 2012 at 11:53:25 AM UTC', 'UTC'],
[3, 'October 13, 2012, 2:53:25 PM GMT+3', 'Etc/GMT-3'],
[15, 'October 13, 2012, 11:53:25 AM UTC', 'UTC'],
[-13, 'October 13, 2012, 11:53:25 AM UTC', 'UTC'],
[9.5, 'October 13, 2012, 9:23:25 PM GMT+9:30', 'Australia/Darwin'],
[-4.5, 'October 13, 2012, 7:23:25 AM GMT-4:30', 'America/Caracas'],
[15.5, 'October 13, 2012, 11:53:25 AM UTC', 'UTC'],
];
}

Expand Down