Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
This commit is contained in:
parent
b33d8a3d60
commit
affeea8c72
|
@ -42,8 +42,7 @@ class DateTimeFormatter extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function formatTimeSpanData() {
|
public function formatTimeSpanData() {
|
||||||
// use the same time all the time, so the tests are reliable when time would switch
|
$time = 1416916800; // Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
|
||||||
$time = time();
|
|
||||||
$deL10N = new \OC_L10N('lib', 'de');
|
$deL10N = new \OC_L10N('lib', 'de');
|
||||||
return array(
|
return array(
|
||||||
array('seconds ago', $time, $time),
|
array('seconds ago', $time, $time),
|
||||||
|
@ -81,8 +80,7 @@ class DateTimeFormatter extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function formatDateSpanData() {
|
public function formatDateSpanData() {
|
||||||
// use the same time all the time, so the tests are reliable when time would switch
|
$time = 1416916800; // Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
|
||||||
$time = time();
|
|
||||||
$deL10N = new \OC_L10N('lib', 'de');
|
$deL10N = new \OC_L10N('lib', 'de');
|
||||||
return array(
|
return array(
|
||||||
// Normal testing
|
// Normal testing
|
||||||
|
|
Loading…
Reference in New Issue