I am trying to use time function in one of my query...I have query like below for add custom timezone time in one of my DATETIME field.
$upd_qry = "update tbl_quotes
set qu_status='".$_GET['status']."', qu_time= $getDatetimeNow
where _quid='".$_GET['quotes_id']."'";
$result=mysqli_query($mysqli,$upd_qry);
and functions for get time with custom timezone is like below
function getDatetimeNow() {
$tz_object = new DateTimeZone('Brazil/East');
//date_default_timezone_set('Brazil/East');
$datetime = new DateTime();
$datetime->setTimezone($tz_object);
return $datetime->format('Y\-m\-d\ h:i:s');
}
but my query is not working...what is wrong in this ?
Thanks