$ Now_time = date ("h: I: s ")

Source: Internet
Author: User
Tags iso 8601 iso 8601 format
$ Now_time = date (& quot; h: I: s & quot;); for information about how to obtain the time, ask your predecessors $ now_time = date (& quot; h: I: s & quot;); will the obtained current time be in the 12-hour format? Where can I set it to a 24-hour system? Because $ now_tim $ now_time = date ("h: I: s"); ask your predecessors about the time.
$ Now_time = date ("h: I: s"); will the obtained current time be in the 12-hour format? Where can I set it to a 24-hour system?
Because
$ Now_time = date ("h: I: s"); for example, 15:50:22
$ S_time = "09:00:00,
$ A = strtotime ($ now_time );
$ B = strtotime ($ s_time );
Echo

------ Solution --------------------
Lowercase h is in 12-hour format, and uppercase is in 24-hour format.
Http://cn.php.net/manual/zh/function.date.php
------ Solution --------------------
H is in 12-hour format. H is in 24-hour format.
------ Solution --------------------
HTML code
The format string can recognize the following format parameter string format characters, indicating the return value example day --- the day of the d month, with the number 01 to the day of the 31 D week of the leading zero, text indicates the day of the day from the three letters Mon to Sun j, and the day of the week without leading 0 to 31 l (lowercase letters of "L, complete text format Sunday to Saturday N ISO-8601 format number represents the day of the week (PHP 5.1.0 plus) 1 (represents Monday) to 7 (represents Sunday) the suffix of S after the number of days per month. it can contain 2 characters including st, nd, rd, and th. It can be the day of the week w with j. The number represents 0 (Sunday) to 6 (Saturday) the day of the year z 0 to 366 weeks --- the week of the year W ISO-8601 format, starting from Monday every week (new in PHP 4.1.0) for example: 42 (42nd weeks of the year) month --- F month, in the complete text format, such as month represented by January or March January to December m, the month is represented by the month Jan to Dec n numbers with the leading 0-01 to 12 M abbreviations, there is no leading zero 1 to 12 t given the number of days of the month should be 28 to 31 years --- L is a leap year if a leap year is 1, otherwise 0 o ISO-8601 format year number. This is the same as Y, except that the week number (W) of ISO belongs to the previous year or the next year. (New PHP 5.1.0) Examples: 1999 or 2003 Y four digits indicate the year in full. for example, 1999 or 2003 y two digits indicate the year. for example: time 99 or 03 --- a lower case morning and afternoon values am or pm A upper case morning and afternoon values AM or pm B Swatch Internet standard values 000 to 999g hours, 12 hours format, no leading 0-1-12G hours, 24-hour format, no leading 0-23 h, 12-hour format, with leading 0-01-12 H, 24-hour format, there are leading 0 00 to 23 I there are leading 0 minutes 00 to 59> s seconds, there are leading 0 00 to 59> time zone --- e time zone ID (new PHP 5.1.0) for example: UTC, GMT, Atlanta/Azores I is set to 1 when it is set to latency; otherwise, it is set to 0. The hours of O and Greenwich mean time difference, for example, the difference between + 0200 P and Greenwich Mean Time (GMT), the colon separation between the hour and the minute (PHP 5.1.3 New plus), for example: + T the Time zone in which the local machine is located, for example, EST and MDT ([note]). it is in full text format in Windows, for example, "Eastern Standard Time ", the Chinese version displays "China Standard Time "). The number of seconds of the Z time difference offset. The time zone offset to the west of UTC is always negative, and the time zone offset to the east of UTC is always positive. -43200 to 43200 complete date/time --- c ISO 8601 format date (new PHP 5): 19: 21 + 00: 00 r RFC 822 format date example: thu, 21 Dec 2000 16:01:07 + 0200 U the number of seconds since the Unix epoch (January 1 1970 00:00:00 GMT). see time ()

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.