forked from Wavyzz/dolibarr
Use idate and jdate to store date
This commit is contained in:
@@ -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"];
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user