Difference between 24:00 and 00:00?

后端 未结 7 2145
青春惊慌失措
青春惊慌失措 2021-01-06 09:57

What is the difference between 24:00 clock and 00:00 clock. IMO 24:00 clock is the day before and 00:00 clock is the beginning of the new day. But I\'m not really convinced

相关标签:
7条回答
  • 2021-01-06 10:42

    There is no 24:00. It's just that PHP understands when you input 24:00, instead of throwing an error, or returning false (like before 5.3). If you tell PHP 24:00 today, it will understand 00:00 tomorrow. And they're both the same moment in PHP's time representation.

    You can tell PHP it's 24:00, but when you ask PHP, it will always say 00:00. 24:00 is just another way of saying 00:00 the following day. There is no zero-length extra second (or something) between 23:59 and 00:00.

    So, I don't understand when you say you can't schedule something for every Saturday at midnight, while you actually have two ways to schedule that: Fri 24:00 or Sat 00:00. No reason for using Sat 00:01.

    0 讨论(0)
提交回复
热议问题