The "time of day" issue is sometimes a strange bird. You might notice that no one has come up with a way to do two clocks in the game and have them accurate to location, ie: Time Zone aware. The devs decided to simplify things apparently, and went with what some refer to as "Base Time". When you are at a given base, and travel anywhere in the world, you boat's clock will continue to display the time as it was from where you departed your home port, or naval base (in theory). This despite possibly traversing multiple time zones every 15° of longitude. When you are transferred to the Far East, you start on the French "base time", aka UTC, and go around the Cape of Good Hope, traversing into the +7 zone, aka "G" or Gulf time zone. The whole trip though, the clock displays UTC. Upon arrival and docking at Penang, you are now on a new "Base Time", which is UTC +7, or Gulf time (or whatever the Kriegsmarine used to designate it). Your patrols will now run on that time.
There are several things that can additionally mess-up the "time" in the game. The use of high Time Compression (TC), or the use of "straight" time, with no TC can both cause game time-keeping errors. The more you do the one over the other, the more it can be thrown out of sync. Contributing to that can be the player's use of shelling-out to Windows and doing other computer tasks while the game is running. That can also be initiated by Windows itself, especially Win10 & 11 with the systray "Notification Area" popping up on you. Keeping TC use mid-range, and not shelling-out to Windows helps with this. You can also have game data configurations that are "off" for one reason or another, or mod conflicts that then result in "bad data" in the Save files, which can then result in strange out-of-sequence day / night cycles. You might think you have the cover of darkness because it looks like night, but the AI thinks it is "high noon", and you end up suddenly having a 500kg bomb down the hatch, or a 5" projectile holing the forward torpedo room...