Hello everyone, I have problems to recover the correct time in the country.
Use this code:
$date=new DateTime(); //this returns the current date time
$result = $date->format(‘YmdHis’);
setlocale (LC_TIME, “it_IT”);
$data = strftime(’%Y%m%d-%h%M’);
echo $data;
$data1 = date(" - Y-m-d H:i:s");
echo $data1;
The time is always 4 hours behind.
What can I check?
Thanks.