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 and I'm new to date programming
Update: Here is what wikipedia article say about military time and style guide about how to deal with 24:00 and 00:00 confusion: http://en.m.wikipedia.org/wiki/24-hour_clock#section_1.
So, now you know that the answer to “Is military time midnight 2400 or 0000?” is 0000. Though it is also a matter of preference. 2400 can also be used to indicate that it is midnight in military time, but it is less popular and more frequently used to refer to the end of a day.
Another convention sometimes used is that, since 12 noon is by definition neither ante meridiem (before noon) nor post meridiem (after noon), then 12am refers to midnight at the start of the specified day (00:00) and 12pm to midnight at the end of that day (24:00).
Midnight is called 24:00 and is used to mean the end of the day and 00:00 is used to mean the beginning of the day.
As the dividing point between one day and another, midnight defies easy classification as either part of the preceding day or of the following day. Though there is no global unanimity on the issue, most often midnight is considered the start of a new day and is associated with the hour 00:00.
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
.
After 23:59 comes 0:00, not 24:00 Please see the code below, in php, as you put the 'php' tag:
echo date('G:i:s', mktime(0,0,0)) . "\n" ;
echo date('G:i:s', mktime(0,0,0)-1) . "\n" ;
It will display:
0:00:00
23:59:59
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With