The problem is that the date changes in the middle of the day. 00:00 (“midnight”) should occur around the middle of the night, so that one day (sunrise to sunset) has a single date assigned to it.
In my opinion it would make more sense to set 00:00 at slightly before sunrise (roughly 4:00 by my clock), that way one night “belongs” to the day that preceded it. But for whatever reason they decided that the date changes in the middle of the night. That’s fine. Middle of the day would not be fine.