Please help me understand why "in" and "of" are differ for DateTime strings

1 day ago 2
ARTICLE AD BOX

Please help me understand why "in" and "of" are so drastically different for DateTime when using a string to find a date.

This works:

$LastSunday = new \DateTime('last Sunday of March '.$theYear);

This throws an error about the timezone not being found in the database:

$LastSunday = new \DateTime('last Sunday in March '.$theYear);

What am I missing?

Read Entire Article