PHP 5.4 Can't Determine Time Zones on its own

前端 未结 6 1084
忘了有多久
忘了有多久 2020-12-20 12:59

I\'m just looking for a little clarification on this. PHP 5.4 eliminated the TZ environmental variable and the \"guessing\" that date_default_timezone_get used

6条回答
  •  抹茶落季
    2020-12-20 13:09

    This is just a wild guess. Could you be able to get the timezone with:

    date('H', 0); or something like that? I mean since the unixtime stamp is the same in all regions but the Hour differs, shouldn't you be able to base on the hour know which timezone is used?

提交回复
热议问题