Clean code
This commit is contained in:
parent
f16a58a62c
commit
77788a0591
@ -5315,6 +5315,7 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Analysis of the pre-selection date
|
// Analysis of the pre-selection date
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) // deprecated usage
|
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) // deprecated usage
|
||||||
{
|
{
|
||||||
// Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'
|
// Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'
|
||||||
|
|||||||
@ -87,10 +87,10 @@ abstract class DoliDB implements Database
|
|||||||
* @param int $param Date TMS to convert
|
* @param int $param Date TMS to convert
|
||||||
* @return string Date in a string YYYY-MM-DD HH:MM:SS
|
* @return string Date in a string YYYY-MM-DD HH:MM:SS
|
||||||
*/
|
*/
|
||||||
public function idate($param)
|
public function idate($param, $tzoutput = 'tzserver')
|
||||||
{
|
{
|
||||||
// TODO GMT $param should be gmt, so we should add tzouptut to 'gmt'
|
// TODO GMT $param should be gmt, so we should add tzouptut to 'gmt'
|
||||||
return dol_print_date($param, "%Y-%m-%d %H:%M:%S");
|
return dol_print_date($param, "%Y-%m-%d %H:%M:%S", 'tzserver');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user