Use idate and jdate to store date

This commit is contained in:
Laurent Destailleur
2009-01-07 10:03:00 +00:00
parent e2c5fb16e1
commit 1f013bb354

View File

@@ -526,6 +526,17 @@ class DoliDb
return "unix_timestamp(".$param.")";
}
/**
* \brief 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
* \param param Date TMS to convert
* \return string Date in a string YYYYMMDDHHMMSS
*/
function idate($param)
{
return adodb_strftime("%Y%m%d%H%M%S",$param);
}
/**
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)