I want the current date and time in GMT+1 to be stored in a string. All the things I've tried uses GMT without daylight saving time.
At this time, that is, I would like to get "2001-05-16 12.31" to be stored in a string. How to do that?
$offset = -7; //hours from GMT that local is $time = time() + ($offset 60 60); $newtime = getdate($time); $time_str = "$newtime[year]-$newtime[month]-$newtime[day] $newtime[hours].$newtime[minutes]";