$now _time = Date ("H:i:s"); Get the question about time, ask the seniors

Source: Internet
Author: User
Tags iso 8601 iso 8601 format local time
$now _time = Date ("H:i:s"); Get the time question, ask the seniors
$now _time = Date ("H:i:s"); Will the current time obtained be 12 o'clock? Where do you want to set up 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 out a <>


------Solution--------------------
The lowercase h is in 12-hour format and capitalized in 24-hour format.
http://cn.php.net/manual/zh/function.date.php
------Solution--------------------
H was supposed to be 12 hours, and H was 24 hours.
------Solution--------------------
HTML Code
The format string can recognize the following format parameter of the strings of the format character description return value Example Day------d month, the number of leading zeros 2 digits 01 to D weeks of the day, text, 3 letters Mon to Sun J Month in the Days, no leading 1 to D ("l" of lowercase letters) days of the week, complete text format Sunday to Saturday N ISO-8601 format number for the day of the week (PHP 5.1.0 new Plus) 1 (for Monday) to 7 (for Sunday) S monthly Days The English suffix of the number followed by 2 characters st,nd,rd or th. You can use the day of the W week with J, the number represents 0 (for Sunday) to 6 (for Saturday) the day of the week in the year 0-366------w ISO-8601 format years, starting from Monday (PHP 4.1.0 New) For example: 4 2 (42nd week of the current year) month------F month, full text format, such as January or March January to December m digit month, with leading 1 to m three letter abbreviation month Jan to Dec The n number represents the month, without leading 1 to the number of days that a given month should have 28-31 years------L is a leap year if the leap year is 1, otherwise 0 o ISO-8601 format years number. This is the same value as Y, except if the day of the Week (W) of the ISO belongs to the previous year or the next year.  (PHP 5.1.0 New) examples:1999 or 2003 y 4-digit year for example: 1999 or 2003 y 2-digit year for example: 99 or 03 Time------a lowercase morning and afternoon value am or PM  A capitalized morning and afternoon value am or PM B Swatch Internet standard when 000 to 999 g hours, 12 hour format, no leading 1 to g hours, 24 hours format, no leading 0 to H hours, 12 hour format, with leading zeros 01 to h hours, 24 hour format, with leading 0 to the number of minutes with leading zeros 00 to 59> s seconds, with a leading 0 to 59> time zone------e time zone identification (PHP 5.1.0 New) For example: Utc,gmt,atlantic/azores I is daylight saving time if it is daylight saving time is 1, otherwise 0 O hours with Greenwich Mean time difference, for example: +0200 P differs from Greenwich Mean Time (GMT), between hours and minutes there is a colon separation (PH P 5.1.3 New) For example: +02:00 T local time zone for example: EST,MDT ("translator note" in Windows for the full text format, such as "Eastern Standard Time", the Chinese version will show "China normal times"). The number of seconds to offset the Z-time difference. The time zone offset in the west of UTC is always negative, and the time zone offset to the east of UTC is always positive. -43200 to 43200 full date/Time------c ISO 8601 format date (PHP 5 new Plus) 2004-02-12t15:19:21+00:00 r RFC 822 format date For example: Thu, DEC 2000 1 6:01:07 +0200 U The number of seconds since the Unix era (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.