N
N
Natalia2016-11-20 17:52:46
PHP
Natalia, 2016-11-20 17:52:46

Translation for winter time, how to spell it correctly?

How to correctly register the transfer to winter time, if summer time was written like this:
error_reporting (E_ALL);
set_time_limit(0);
ignore_user_abort(true);
//ob_start();
date_default_timezone_set('UTC');
$_startTime = microtime(true);
$_time = time();
$_fileDir = dirname(__FILE__);
$_fileRootDir = substr($_fileDir, 0, -9);
$date = new \DateTime('@' . $contest['end_time']);
$date->setTimezone(new \DateTimeZone('Europe/Kiev'));
$start_today = mktime($date->format('H'), 0, 0, $date->format('n'), $date->format('j'), $date->format('Y '));
$end_totay = mktime($date->format('H') - 1, 59, 59 $date->
echo '' . $date->format('c') . '';
echo '' . $start_today . ' ' . $end_totay . '';
$date = new \DateTime('@' . $contest['end_time']);
$start_today = mktime($date->format('H'), 0, 0, $date->format('n'), $date->format('j'), $date->format('Y '));
$end_totay = mktime($date->format('H') - 1, 59, 59 $date->format('n'), $date->format('j') + 1, $date->format ('Y'));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-11-20
Protko @Fesor

How to

Don't do it. If you specify the time in UTC and then add a time zone, everything will be taken into account for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question