diff options
| author | Nils Adermann <naderman@naderman.de> | 2014-10-25 21:26:38 -0700 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2014-10-25 21:26:38 -0700 |
| commit | 5441a4ea132c2cc6e86e1446c48e276eeb728970 (patch) | |
| tree | c8ee37529e9d4a76e1990ede075e1519f42d0c25 | |
| parent | 5c1ef4548811cc73536deba7ce71f414f3736095 (diff) | |
| parent | 1046ada9fc5b5d78e7e0631a8003ce10d0089174 (diff) | |
| download | forums-5441a4ea132c2cc6e86e1446c48e276eeb728970.tar forums-5441a4ea132c2cc6e86e1446c48e276eeb728970.tar.gz forums-5441a4ea132c2cc6e86e1446c48e276eeb728970.tar.bz2 forums-5441a4ea132c2cc6e86e1446c48e276eeb728970.tar.xz forums-5441a4ea132c2cc6e86e1446c48e276eeb728970.zip | |
Merge pull request #3067 from marc1706/ticket/13216
[ticket/13216] Use gmdate() instead of date() in datetime tests
| -rw-r--r-- | tests/datetime/from_format_test.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/datetime/from_format_test.php b/tests/datetime/from_format_test.php index f10402e8cb..8968619bb5 100644 --- a/tests/datetime/from_format_test.php +++ b/tests/datetime/from_format_test.php @@ -60,44 +60,44 @@ class phpbb_datetime_from_format_test extends phpbb_test_case // If the current time is too close to the testing time, // the relative time will use "x minutes ago" instead of "today ..." // So we use 18:01 in the morning and 06:01 in the afternoon. - $testing_time = date('H') <= 12 ? '18:01' : '06:01'; + $testing_time = gmdate('H') <= 12 ? '18:01' : '06:01'; return array( array( - date('Y-m-d', time() + 2 * 86400) . ' ' . $testing_time, false, - date('Y-m-d', time() + 2 * 86400) . ' ' . $testing_time, + gmdate('Y-m-d', time() + 2 * 86400) . ' ' . $testing_time, false, + gmdate('Y-m-d', time() + 2 * 86400) . ' ' . $testing_time, ), array( - date('Y-m-d', time() + 86400) . ' ' . $testing_time, false, + gmdate('Y-m-d', time() + 86400) . ' ' . $testing_time, false, 'Tomorrow ' . $testing_time, ), array( - date('Y-m-d', time() + 86400) . ' ' . $testing_time, true, - date('Y-m-d', time() + 86400) . ' ' . $testing_time, + gmdate('Y-m-d', time() + 86400) . ' ' . $testing_time, true, + gmdate('Y-m-d', time() + 86400) . ' ' . $testing_time, ), array( - date('Y-m-d') . ' ' . $testing_time, false, + gmdate('Y-m-d') . ' ' . $testing_time, false, 'Today ' . $testing_time, ), array( - date('Y-m-d') . ' ' . $testing_time, true, - date('Y-m-d') . ' ' . $testing_time, + gmdate('Y-m-d') . ' ' . $testing_time, true, + gmdate('Y-m-d') . ' ' . $testing_time, ), array( - date('Y-m-d', time() - 86400) . ' ' . $testing_time, false, + gmdate('Y-m-d', time() - 86400) . ' ' . $testing_time, false, 'Yesterday ' . $testing_time, ), array( - date('Y-m-d', time() - 86400) . ' ' . $testing_time, true, - date('Y-m-d', time() - 86400) . ' ' . $testing_time, + gmdate('Y-m-d', time() - 86400) . ' ' . $testing_time, true, + gmdate('Y-m-d', time() - 86400) . ' ' . $testing_time, ), array( - date('Y-m-d', time() - 2 * 86400) . ' ' . $testing_time, false, - date('Y-m-d', time() - 2 * 86400) . ' ' . $testing_time, + gmdate('Y-m-d', time() - 2 * 86400) . ' ' . $testing_time, false, + gmdate('Y-m-d', time() - 2 * 86400) . ' ' . $testing_time, ), ); } |
