mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 11:21:23 +01:00
renamed datetime class to egw_datetime to support php5.2
This commit is contained in:
parent
c2d8db0e2f
commit
88048ecc2f
@ -37,11 +37,12 @@
|
|||||||
unset($d2);
|
unset($d2);
|
||||||
unset($d3);
|
unset($d3);
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
@class datetime
|
* eGroupWare datetime class that contains common date/time functions
|
||||||
@abstract datetime class that contains common date/time functions
|
*
|
||||||
|
* renamed to egw_datetime to support php5.2
|
||||||
*/
|
*/
|
||||||
class datetime
|
class egw_datetime
|
||||||
{
|
{
|
||||||
var $zone_offset_list = array(
|
var $zone_offset_list = array(
|
||||||
'ACT' => '+9:30',
|
'ACT' => '+9:30',
|
||||||
@ -565,7 +566,22 @@
|
|||||||
var $users_localtime;
|
var $users_localtime;
|
||||||
var $cv_gmtdate;
|
var $cv_gmtdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calling the constructor of the renamed class
|
||||||
|
*
|
||||||
|
* @return egw_datetime
|
||||||
|
*/
|
||||||
function datetime()
|
function datetime()
|
||||||
|
{
|
||||||
|
return $this->egw_datetime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of the renamed class
|
||||||
|
*
|
||||||
|
* @return egw_datetime
|
||||||
|
*/
|
||||||
|
function egw_datetime()
|
||||||
{
|
{
|
||||||
$this->tz_offset = 3600 * (int)@$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset'];
|
$this->tz_offset = 3600 * (int)@$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset'];
|
||||||
print_debug('datetime::datetime::gmtnow',$this->gmtnow,'api');
|
print_debug('datetime::datetime::gmtnow',$this->gmtnow,'api');
|
||||||
@ -587,7 +603,7 @@
|
|||||||
}
|
}
|
||||||
$this->users_localtime = time() + $this->tz_offset;
|
$this->users_localtime = time() + $this->tz_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getntpoffset()
|
function getntpoffset()
|
||||||
{
|
{
|
||||||
$error_occured = False;
|
$error_occured = False;
|
@ -662,6 +662,8 @@
|
|||||||
function &CreateObject($class)
|
function &CreateObject($class)
|
||||||
{
|
{
|
||||||
list($appname,$classname) = explode('.',$class);
|
list($appname,$classname) = explode('.',$class);
|
||||||
|
|
||||||
|
if ($classname == 'datetime') $classname = 'egw_datetime'; // php5.2 fix
|
||||||
|
|
||||||
include_once(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
|
include_once(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user