diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 32c13bb9f2b..2e3bd7ccdb6 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -251,8 +251,8 @@ class Contrat extends CommonObject */ function fetch($id) { - $sql = "SELECT rowid, statut, ref, fk_soc, ".$this->db->pdate("mise_en_service")." as datemise,"; - $sql.= " fk_user_mise_en_service, ".$this->db->pdate("date_contrat")." as datecontrat,"; + $sql = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,"; + $sql.= " fk_user_mise_en_service, date_contrat as datecontrat,"; $sql.= " fk_user_author,"; $sql.= " fk_projet,"; $sql.= " fk_commercial_signature, fk_commercial_suivi,"; @@ -272,9 +272,9 @@ class Contrat extends CommonObject $this->statut = $result["statut"]; $this->factureid = $result["fk_facture"]; $this->facturedetid = $result["fk_facturedet"]; - $this->mise_en_service = $result["datemise"]; + $this->mise_en_service = $this->db->jdate($result["datemise"]); $this->date_fin_validite = $result["datefin"]; - $this->date_contrat = $result["datecontrat"]; + $this->date_contrat = $this->db->jdate($result["datecontrat"]); $this->user_author_id = $result["fk_user_author"]; diff --git a/htdocs/lib/databases/mssql.lib.php b/htdocs/lib/databases/mssql.lib.php index 5bd9afd69c9..8866e4d9af3 100644 --- a/htdocs/lib/databases/mssql.lib.php +++ b/htdocs/lib/databases/mssql.lib.php @@ -564,10 +564,10 @@ class DoliDb * \param param Date TMS to convert * \return string Date in a string YYYYMMDDHHMMSS */ - function gmtosdate($param) + /*function gmtosdate($param) { return adodb_strftime("%Y%m%d%H%M%S",$param,true); - } + }*/ /** * \brief Convert (by PHP) a GM string date into a GM Timestamps date @@ -575,13 +575,13 @@ class DoliDb * \return date Date TMS * \example 19700101020000 -> 7200 */ - function gmtotdate($string) + /*function gmtotdate($string) { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; - } + }*/ /** * \brief Formatage d'un if SQL diff --git a/htdocs/lib/databases/mysql.lib.php b/htdocs/lib/databases/mysql.lib.php index e3ae50d58f1..fcb536ed3b0 100644 --- a/htdocs/lib/databases/mysql.lib.php +++ b/htdocs/lib/databases/mysql.lib.php @@ -546,10 +546,10 @@ class DoliDb * \param param Date TMS to convert * \return string Date in a string YYYYMMDDHHMMSS */ - function gmtosdate($param) + /*function gmtosdate($param) { return adodb_strftime("%Y%m%d%H%M%S",$param,true); - } + }*/ /** * \brief Convert (by PHP) a GM string date into a GM Timestamps date @@ -557,13 +557,13 @@ class DoliDb * \return date Date TMS * \example 19700101020000 -> 7200 */ - function gmtotdate($string) + /*function gmtotdate($string) { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; - } + }*/ /** diff --git a/htdocs/lib/databases/mysqli.lib.php b/htdocs/lib/databases/mysqli.lib.php index c08c6105e67..7b83536ac85 100644 --- a/htdocs/lib/databases/mysqli.lib.php +++ b/htdocs/lib/databases/mysqli.lib.php @@ -571,10 +571,10 @@ class DoliDb * \param param Date TMS to convert * \return string Date in a string YYYYMMDDHHMMSS */ - function gmtosdate($param) + /*function gmtosdate($param) { return adodb_strftime("%Y%m%d%H%M%S",$param,true); - } + }*/ /** * \brief Convert (by PHP) a GM string date into a GM Timestamps date @@ -582,14 +582,14 @@ class DoliDb * \return date Date TMS * \example 19700101020000 -> 7200 */ - function gmtotdate($string) + /*function gmtotdate($string) { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; } - + */ /** * \brief Formatage d'un if SQL diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php index d91dce603d9..70f15f200c6 100644 --- a/htdocs/lib/databases/pgsql.lib.php +++ b/htdocs/lib/databases/pgsql.lib.php @@ -689,10 +689,10 @@ class DoliDb * \param param Date TMS to convert * \return string Date in a string YYYYMMDDHHMMSS */ - function gmtosdate($param) + /*function gmtosdate($param) { return adodb_strftime("%Y%m%d%H%M%S",$param,true); - } + }*/ /** * \brief Convert (by PHP) a GM string date into a GM Timestamps date @@ -700,13 +700,13 @@ class DoliDb * \return date Date TMS * \example 19700101020000 -> 7200 */ - function gmtotdate($string) + /*function gmtotdate($string) { $string=eregi_replace('[^0-9]','',$string); $tmp=$string.'000000'; $date=dolibarr_mktime(substr($tmp,8,2),substr($tmp,10,2),substr($tmp,12,2),substr($tmp,4,2),substr($tmp,6,2),substr($tmp,0,4),1); return $date; - } + }*/ /** * \brief Formatage d'un if SQL