mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
Fix pb into date management.
Added phpunit to avoid this in future.
This commit is contained in:
@@ -999,8 +999,9 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
/**
|
||||
* Return an array with locale date info.
|
||||
* PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
||||
* WARNING: This function always use PHP server timezone to return locale informations.
|
||||
* WARNING: This function always use PHP server timezone to return locale informations !!!
|
||||
* Usage must be avoid.
|
||||
* FIXME: Replace this with PHP date function and a parameter $gm
|
||||
*
|
||||
* @param int $timestamp Timestamp
|
||||
* @param boolean $fast Fast mode
|
||||
@@ -1010,7 +1011,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
* 'minutes' => $min,
|
||||
* 'hours' => $hour,
|
||||
* 'mday' => $day,
|
||||
* 'wday' => $dow,
|
||||
* 'wday' => $dow, 0=sunday, 6=saturday
|
||||
* 'mon' => $month,
|
||||
* 'year' => $year,
|
||||
* 'yday' => floor($secsInYear/$_day_power),
|
||||
@@ -1044,7 +1045,7 @@ function dol_getdate($timestamp,$fast=false)
|
||||
{
|
||||
$arrayinfo=getdate($timestamp);
|
||||
|
||||
$startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1;
|
||||
/*$startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1;
|
||||
if($startday==1)
|
||||
{
|
||||
if ($arrayinfo["wday"]==0)
|
||||
@@ -1055,7 +1056,7 @@ function dol_getdate($timestamp,$fast=false)
|
||||
{
|
||||
$arrayinfo["wday"]=$arrayinfo["wday"]-1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return $arrayinfo;
|
||||
|
||||
Reference in New Issue
Block a user