I also searched the PHP and StackOverflow manual, but didn’t really find the right answer to my question. My dates are stored in UTC. Now if I do this:
$date = new DateTime('2012-03-16 14:00:00', 'UTC'); $date->setTimezone('Europe/Budapest');
Will DateTime :: setTimezone () automatically set DST? So, if I format the string, will it output 15:00:00 in the summer and 16:00:00 in the winter? Or will I have to install DST manually?
A related question, if I want to get DST time independent time (which I can save), will there be a next job?
$date = new DateTime('now', 'UTC'); $date->format('Ymd H:i:s');
Or is it better to use simple gmdate('Ymd H:i:s') ?
source share