Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php 5.3 Fatal error Class DateTimeZone not found [duplicate]

I tried, to run the following code, on PHP v5.3.13, but still getting the class not found error:

$tZone = new DateTimeZone("Europe/Amsterdam");

How can I use DateTimeZone on 5.3.13?

like image 771
xam Avatar asked Dec 01 '22 00:12

xam


1 Answers

Try this:

$tZone = new \DateTimeZone("Europe/Amsterdam");
like image 150
Dragony Avatar answered Dec 05 '22 19:12

Dragony