Handle absolute dates and times before 1970-01-01T00:00:01+0000

refs #33
This commit is contained in:
Alexander A. Klimov 2017-09-05 13:15:57 +02:00
parent 968e95754c
commit dc47c074d7

View file

@ -162,6 +162,10 @@ class TimeRangePickerForm extends Form
$this->getUrl()->remove("graph_$part");
} else {
if ($dateTime->getTimestamp() < 1) {
$dateTime = DateTime::createFromFormat('U', '1')->setTimezone($this->getTimeZone());
}
if ($addInterval !== null) {
$dateTime->add(new DateInterval($addInterval));
}