One of my important works tasks today turned on whether midnight is part of “today” or part of “tomorrow.” As you might expect, my colleagues at The Old Farmer’s Almanac have many opinions on this issue, the predominate one apparently being that midnight is neither today nor tomorrow, but some amorphous nether region betwixt the days. Here’s what the 2006 edition says about midnight, in the “Astronomical Glossary” on page 75:
Midnight: Astronomical midnight is the time when the Sun is opposite its highest point in the sky (noon). Midnight is neither A.M. nor P.M., although 12-hour digital clocks typically display midnight as 12:00 A.M. On a 24-hour time cycle, 00:00, rather than 24:00, usually indicates midnight.
The issue at hand was that the tool we use for calculating sunrise and sunset times returns midnight as 24:00, but the tool we use for converting this to the user’s local time expects midnight as 00:00. In any case, problem resolved, and you can rest easy that sunrise and sunsets will emerge correctly when the sunset happens to coincide with midnight GMT.