Most of us dont know how the system time works even if its off.. Also it updates incredibly when restarts or we dont on it for a long time.
The date and time updates automatically because of C-mos battery (shown in fig). It supplys power even the computer unplugged or its off..