diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-12-11 14:11:07 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-12-11 14:11:07 +0100 |
commit | 17d68e0638e65bdd5b59a68ffe366444723f5e8d (patch) | |
tree | 1f3d4a033ca205dfcf3a226a01b733ae3436564f /tests/lib | |
parent | f5348d99e0b16849010975ebd6a2b4d93e720cc6 (diff) | |
parent | affeea8c72db3f82bd0cee82c8a08d016bd3d72f (diff) | |
download | nextcloud-server-17d68e0638e65bdd5b59a68ffe366444723f5e8d.tar.gz nextcloud-server-17d68e0638e65bdd5b59a68ffe366444723f5e8d.zip |
Merge pull request #12780 from owncloud/make-datetimeformattertest-reliable
Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/datetimeformatter.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/lib/datetimeformatter.php b/tests/lib/datetimeformatter.php index 4b91c3a1cc7..9a50ee4a257 100644 --- a/tests/lib/datetimeformatter.php +++ b/tests/lib/datetimeformatter.php @@ -42,8 +42,7 @@ class DateTimeFormatter extends TestCase { } public function formatTimeSpanData() { - // use the same time all the time, so the tests are reliable when time would switch - $time = time(); + $time = 1416916800; // Use a fixed timestamp so we dont switch days/years with the getTimestampAgo $deL10N = new \OC_L10N('lib', 'de'); return array( array('seconds ago', $time, $time), @@ -81,8 +80,7 @@ class DateTimeFormatter extends TestCase { } public function formatDateSpanData() { - // use the same time all the time, so the tests are reliable when time would switch - $time = time(); + $time = 1416916800; // Use a fixed timestamp so we dont switch days/years with the getTimestampAgo $deL10N = new \OC_L10N('lib', 'de'); return array( // Normal testing |