]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
authorJoas Schilling <nickvergessen@gmx.de>
Thu, 11 Dec 2014 12:22:05 +0000 (13:22 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 11 Dec 2014 12:22:05 +0000 (13:22 +0100)
tests/lib/datetimeformatter.php

index 4b91c3a1cc72c92ca33ff3aa4aeb63762d94df52..9a50ee4a257307ed03c3618d68a5e9bb880b06cc 100644 (file)
@@ -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