About GMT and UTCFirst, IntroductionMany people know that the two-way schedule is referred to as GMT or UTC, and the World Time Zone table is referred to as universal, so what is the actual intent of GMT and UTC? How is the world time zone
GMT is utc/gmt time, January 01, 1970 00:00 00 seconds (that is, utc+8 Beijing time January 01, 1970 08:00 00 seconds)The calculation code is as follows:
1 /**2 * Gets the number of seconds from the specified time to GMT3 * UTC: GMT January 01,
The whole earth is divided into twenty-four time zones, each of which has its own local time. For international radio communication, a unified time is used for the sake of unification, called Universal coordination Time (UTC, Universal Time
/*** Take the GMT *@return */ Public StaticString Getbeijingtime () {returnGetformateddatestring (8); } /*** Take Bangalore time *@return */ Public StaticString Getbangaloretime () {returnGetformateddatestring (5.5f); }
UTC time & local time (1)
The whole earth is divided into twenty-four time zones, each of which has its own local time. For international radio communication, a unified time is used for the sake of unification, called Universal coordination Time
Each region has its own local time, and the time conversion problem on the Internet and radio communication is particularly prominent. Record here for memo.
The whole earth is divided into twenty-four time zones, each of which has its own local
Beijing isGetzonetime(8), New York isGetzonetime(-5), Bangalore isGetzonetime(5.5). The offset value is the time zone difference in this time zone relative to Greenwich time zonefunctionGetzonetime (offset) {//take local time varLocalTime
PHP Tutorial Set the Date_default_timezone_set function ()
Definition and usage
The Date_default_timezone_set () function sets the default time zone for all date/time functions used in the script.
GrammarDate_default_timezone_set (TimeZone)
$
Php sets the Beijing time function date_default_timezone_set (). In the php Tutorial, set the definition and usage of the Beijing time function date_default_timezone_set () to the default time zone of all date and time functions in the script.
Set the Beijing time function date_default_timezone_set () in the php Tutorial ()Definition and usageThe date_default_timezone_set () function is used to set the default time zone of all date/time functions in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.