October 25, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video