mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
Fixed timestamp converstion not working
This commit is contained in:
parent
e8bf8cbf0c
commit
ccf42f2b2a
@ -127,12 +127,12 @@
|
||||
|
||||
function to_timestamp($epoch)
|
||||
{
|
||||
return date('YmdHis',$epoch);
|
||||
return date('Y-m-d H:i:s',$epoch);
|
||||
}
|
||||
|
||||
function from_timestamp($timestamp)
|
||||
{
|
||||
ereg('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})',$timestamp,$parts);
|
||||
ereg('([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})',$timestamp,$parts);
|
||||
|
||||
return mktime($parts[4],$parts[5],$parts[6],$parts[2],$parts[3],$parts[1]);
|
||||
}
|
||||
|
@ -106,11 +106,11 @@
|
||||
{
|
||||
if (floor($this->db_version) == 6)
|
||||
{
|
||||
return $this->from_timestamp_6($epoch);
|
||||
return $this->from_timestamp_6($timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->from_timestamp_7($epoch);
|
||||
return $this->from_timestamp_7($timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user