Commit 1407b98d authored by Victor Emanouilov's avatar Victor Emanouilov
Browse files

[FIX] currency formatter in list plugin - make sure conversion of date strings...

[FIX] currency formatter in list plugin - make sure conversion of date strings observes the UTC timezone string are saved as in the index
parent b8a8507b
Pipeline #602178474 passed with stages
in 8 minutes and 38 seconds
......@@ -76,7 +76,12 @@ class Search_Formatter_ValueFormatter_Currency extends Search_Formatter_ValueFor
} elseif (is_int($this->date)) {
$this->date = date('Y-m-d', $this->date);
} else {
$this->date = date('Y-m-d', strtotime($this->date));
// index times are UTC
$old_tz = date_default_timezone_get();
date_default_timezone_set('UTC');
$time = strtotime($this->date);
date_default_timezone_set($old_tz);
$this->date = date('Y-m-d', $time);
}
$field['value'] = $value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment