Skip to content
Snippets Groups Projects
Commit 494dd55b authored by StepanKuzmin's avatar StepanKuzmin Committed by Eric Mckenna
Browse files

Issue #1225672 by StepanKuzmin, tekante | guillaumev: Fixed Bug when

importing a single year.
parent f56b7ee8
No related branches found
No related tags found
No related merge requests found
...@@ -534,7 +534,10 @@ class FeedsDateTime extends DateTime { ...@@ -534,7 +534,10 @@ class FeedsDateTime extends DateTime {
public function __construct($time = '', $tz = NULL) { public function __construct($time = '', $tz = NULL) {
// Assume UNIX timestamp if numeric. // Assume UNIX timestamp if numeric.
if (is_numeric($time)) { if (is_numeric($time)) {
$time = "@" . $time; // Make sure it's not a simple year
if ((is_string($time) && strlen($time) > 4) || is_int($time)) {
$time = "@" . $time;
}
} }
// PHP < 5.3 doesn't like the GMT- notation for parsing timezones. // PHP < 5.3 doesn't like the GMT- notation for parsing timezones.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment