Closed
Description
Object DateTime
has $timezone
as one of internal variable used for correct convert between date formats. If is not defined in call new DateTime()
, is set to current timezone based on date_default_timezone_set()
function or php.ini
configuration.
Method UTCDateTime::toDateTime
is ignoring this convention and always create DateTime
object with timezone +0000
and is necessarily to keep in mind and rewrite timezone on every use this method:
$UTCDateTime->toDateTime()->setTimeZone( new \DateTimeZone( date_default_timezone_get() ) );
Metadata
Metadata
Assignees
Labels
No labels