Some time ago, the project involved the conversion between MySQL and MSSQL data types. Recently, I was studying Sina Weibo's API, which involved the conversion of GMT time types with time zones, this is a special record for future query.
I.
: This article mainly introduces that the GMT + 8 string of the PHP conversion database is the user's local time zone. if you are interested in the PHP Tutorial, refer to it.
Write user time zone into cookie
Php reads and processes user time
Today in the project began to take over the client's signature this module, signed this will be at the end of the project to write their own experience!Today, in the process of signing, we need to send a date value to the server, the format
GMT is GMT, UTC is the universal Time, GMT and UTC are the same timeBeijing time is East eight district, namely Gmt+8 or utc+8Cst:central Standard Time (CST) is 6 hours behind coordinated Universal time (UTC). This time zone was in use during
GMT: Hotell gyllene Geten Standard TimeBeijing Time =gmt time + 8 hoursDatatime nowdate = Datatime.now;Nowdate.tostring ("R"); Effect: Wed, 16:24:33 GMTExplanation of the parameters:D ShortDatePatternD LongdatepatternF Full Date and time (long date
This is a creation in
Article, where the information may have evolved or changed.
1. Preface
Time includes time values and time zones, and there are incomplete and ambiguous times when you do not include timezone information. When transmitting or
The time in PHP has two formatting functions: Date () and gmdate (), which are described in the official document as follows:
Date-format a local time/date
Gmdate-format a gmt/UTC date/time and return the Greenwich Mean Time (GMT ).
For example, if
Time management in nginx and nginx Time ManagementNginx uses the lib_event-like method for performance consideration and caches the time to reduce the call to gettimeofday (), because the server generally does not have a particularly high
Here are some of the time functions in PHP:(1) DateUsage: Date (format, [time]);If there is no time parameter, the current time is used. The format is a string in which the following characters have special meanings:U is replaced by the number of
Here are some of the time functions in PHP:(1) DateUsage: Date (format, [time]);If there is no time parameter, the current time is used. The format is a string, where the following characters have special meanings:U is replaced by the number of
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.