mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 01:48:01 +02:00
do not convert empty values, otherwise we will get current date or 1970-01-01 instead
This commit is contained in:
parent
21a1f6ea64
commit
cf96d4e82d
@ -101,6 +101,8 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
|||||||
*/
|
*/
|
||||||
public function format_date($value)
|
public function format_date($value)
|
||||||
{
|
{
|
||||||
|
if (!$value) return $value; // otherwise we will get current date or 1970-01-01 instead of an empty value
|
||||||
|
|
||||||
if ($this->attrs['dataformat'] && !is_numeric($value))
|
if ($this->attrs['dataformat'] && !is_numeric($value))
|
||||||
{
|
{
|
||||||
$date = date_create_from_format($this->attrs['dataformat'], $value, egw_time::$user_timezone);
|
$date = date_create_from_format($this->attrs['dataformat'], $value, egw_time::$user_timezone);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user