Qual: All dolibarr code now use dol_xxx function to manage dates
This commit is contained in:
parent
66734cc08e
commit
de33a568cb
@ -542,6 +542,7 @@ class DoliDBMssql
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Escape a string to insert data.
|
* Escape a string to insert data.
|
||||||
|
*
|
||||||
* @param stringtoencode String to escape
|
* @param stringtoencode String to escape
|
||||||
* @return string String escaped
|
* @return string String escaped
|
||||||
*/
|
*/
|
||||||
@ -554,19 +555,21 @@ class DoliDBMssql
|
|||||||
/**
|
/**
|
||||||
* Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
* @param param Date TMS to convert
|
*
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
* @param string $param Date TMS to convert
|
||||||
|
* @return string Date in a string YYYYMMDDHHMMSS
|
||||||
*/
|
*/
|
||||||
function idate($param)
|
function idate($param)
|
||||||
{
|
{
|
||||||
return adodb_strftime("%Y-%m-%d %H:%M:%S",$param);
|
return dol_print_date($param,"%Y-%m-%d %H:%M:%S",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* 19700101020000 -> 3600 with TZ+1
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
* @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
*
|
||||||
* @return date Date TMS
|
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
|
* @return date Date TMS
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -537,20 +537,20 @@ class DoliDBMysql
|
|||||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
*
|
*
|
||||||
* @param param Date TMS to convert
|
* @param string $param Date TMS to convert
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
* @return string Date in a string YYYYMMDDHHMMSS
|
||||||
*/
|
*/
|
||||||
function idate($param)
|
function idate($param)
|
||||||
{
|
{
|
||||||
return adodb_strftime("%Y%m%d%H%M%S",$param);
|
return dol_print_date($param,"%Y%m%d%H%M%S",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* 19700101020000 -> 3600 with TZ+1
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
*
|
*
|
||||||
* @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* @return date Date TMS
|
* @return date Date TMS
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -549,20 +549,20 @@ class DoliDBMysqli
|
|||||||
* Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
*
|
*
|
||||||
* @param param Date TMS to convert
|
* @param string $param Date TMS to convert
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
* @return string Date in a string YYYYMMDDHHMMSS
|
||||||
*/
|
*/
|
||||||
function idate($param)
|
function idate($param)
|
||||||
{
|
{
|
||||||
return adodb_strftime("%Y%m%d%H%M%S",$param);
|
return dol_print_date($param,"%Y%m%d%H%M%S",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* 19700101020000 -> 3600 with TZ+1
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
*
|
*
|
||||||
* @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* @return date Date TMS
|
* @return date Date TMS
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -693,20 +693,20 @@ class DoliDBPgsql
|
|||||||
* Convert (by PHP) a GM Timestamp date into a GM string date to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a GM string date to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
*
|
*
|
||||||
* @param param Date TMS to convert
|
* @param string $param Date TMS to convert
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
* @return string Date in a string YYYYMMDDHHMMSS
|
||||||
*/
|
*/
|
||||||
function idate($param)
|
function idate($param)
|
||||||
{
|
{
|
||||||
return adodb_strftime("%Y-%m-%d %H:%M:%S",$param);
|
return dol_print_date($param,"%Y-%m-%d %H:%M:%S",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* 19700101020000 -> 3600 with TZ+1
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
*
|
*
|
||||||
* @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* @return date Date TMS
|
* @return date Date TMS
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user