Solved

How does "military" time work around midnight

Posted on 2000-02-25
7
1,060 Views
Last Modified: 2011-10-03
Not a C++ question, but...

What are the rules for "military" time (i.e 24 hour time, like used in the military and some countries.)  I am curious what the earliest time is.  Is it 00:00, 00:01, 1:00?  What is the highest time, is it 23:59, 24:00, 24:59?

Are there any other rules I need to know to use it correctly?
0
Comment
Question by:nietod
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 24

Expert Comment

by:SunBow
ID: 2559270
Always confusing, especially over Y2K since there were many approaches Jan 1, and the conflicted.  IMHO, MidNight begins the next day 00:00, not ends the prior one 24:00.

Best example: noon is 12:00 PM
so midNight MUST BE the AM alternative, or 00:00, but many say "twenty-four hundred hours" becauce it fits the language better.

DST? Not all do it.
0
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 2559290
Well, here in Germany the day starts at midnight with 00:00 and ends with the highest time at 23:59. It's hard for me to prove that, but it never was different during the last 30 years ;-)
0
 
LVL 24

Expert Comment

by:SunBow
ID: 2559296
Pr1me time: TOD things on the wires cost more, vs non-prime.
Then there's Greenwich and alternatives. Whether to use seconds, or as some do, hundreds (especially for timekeeping/payroll/accounting humans).
Then there's tics.

All Countries? some don't care about base 12 system, but I think in any programming area, things will work better for you if you count UP TO 1, not count up FROM one o'clock.  

1:00 AM minus one minute = 0:59 AM

What to do with leading zeroes is always an issue. As you can see by example, I do not like them.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 32

Expert Comment

by:jhance
ID: 2559493
In 24HR time, the day begins at 0000 and ends at 2359.  There is no 2400 time.


0000 is equivalent to 12:00 AM (MIDNIGHT) and 2359 is equivalent to 11:59 PM.

It goes like this:

0000     12:00 AM   DAY 1
0100     01:00 AM
....
1159     11:59 AM
1200     12:00 PM
1300     01:00 PM
....
2359     11:59 PM
0000     12:00 AM   DAY 2
0
 
LVL 22

Author Comment

by:nietod
ID: 2559538
Thanks all.  Especially jkr and jhance, who was clear, but clearly late.
0
 
LVL 86

Expert Comment

by:jkr
ID: 2559559
The interesting thing is that I didn't know that this is called 'military' time...

Do computer communication protocols mean to salute the mouse and call it 'Sir'? ;-)
0
 
LVL 22

Author Comment

by:nietod
ID: 2559791
It this country it is called "military" time because even though most everything in the countery uses am/pm 12 hour time, the military does use 24 hour time since it is is short and precise.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question