Haven’t ever done that, but pretty sure they have clocks on board.
I’ll volunteer for the next one
I’ve done the 100+ day submarine thing several times. A clock is right twice a day, ergo the military time with 0200/1400 stuff. If you stay down and don’t surface, mid-rats let you know it’s midnite. You get used to it. Field days and poker games and Russians to hunt keep you going. Along with books.