How can I set the time pattern as UTC or GMT in PHP?

Asked

Viewed 459 times

1

Several systems, large sites when it is possible to inform the time they ask for the choice of UTC or GMT. I tried this in PHP, but I was not successful using default_date_timezone_set(), how can I do this?

  • 2

    Yes it is possible with the default_date_timezone_set(), which team do you take? without success means what exactly?

1 answer

3


One can use date_default_timezone_set('UTC').

Coordinated Univeral Time is the same thing as Greenwich Mean Time, but today UTC subjectively is considered more correct in the scientific environment, I don’t know why. For computing it is still, but it is more modern to use UTC.

As it is conceptual there is no better, faster, none of this. Understand that UTC is a referential measure. GMT is considered a time zone like any other that is confused with UTC. In London/UK the GMT is used most of the year as official zone (but not all the time because of daylight saving time).

More information here and here.

  • I wasn’t going to answer this, but the AP removed the other question I was answering and didn’t want to miss the already ready answer. http://answall.com/questions/124120/utc-e-gmt-há-diferença-entre-eles-ganho-vantagem-na-utilização-de-um-e-outro

  • Sorry, I won a lot of negative...so I thought if I stayed open I’d be like a lot of other n all, only wins negative and no answer that answers the question, I’m really sorry

  • Like I do with UTC to pick up the local schedules, I see type: UTC-2: City....

  • I don’t know if I understand, but UTC is time zero, from there you have the hours that are more or less of it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.