OiO.lk Blog PHP Will getTimezone() EVER return false when invoked on a PHP DateTime or DateTimeImmutable object?
PHP

Will getTimezone() EVER return false when invoked on a PHP DateTime or DateTimeImmutable object?


In the docs it says that the function returns a DateTimeZone object on success or false on failure. My question is, in which cases will this result in a failure?

In my experience, it is never failing and it always returns a DateTimeZone object.



You need to sign in to view this answers

Exit mobile version