4

I wonder what this output of echo json_encode(new \DateTime()); means:

    {
        "date":"2019-04-16 14:43:15.126710",
        "timezone_type":3,
        "timezone":"Europe\/Berlin"
    }

date and timezone are obvious... but what is this timezone_type? The official documentation didn't help me much. The page about DateTime speaks of no such thing, it just mentions you can get/set a DateTimeZone. The page about DateTimeZone doesn't help either.

So... what is it? Where does PHP get it from? And what is it good for?

Martin Grey
  • 744
  • 2
  • 12
  • 26
  • That question asks how to construct DateTimes in a particular way. This question asks what a particular property of DateTime is. I think they are related, but not duplicate. – Martin Grey Apr 16 '19 at 15:20

0 Answers0