How does GPS calculate time
If a GPS receiver doesn't see satellites, then what you see in the software is not the GPS time.  Probably, your GPS unit has some backup timekeeping (quartz crystal).

Some GPS units have a low power crystal with a backup battery.  It provides an approximate time, which allows the receiver to reduce the search space, which reduces the time to first fix.