Teensy 4.1 module rtc

The teensy 4.1 board has a built in rtc module, but does it fetch the time data when it is connected to a PC? Or does it still work when separately powered using a battery? If its possible to make it work on battery, are there any resources or examples on how to do so? I'm a beginner when it comes to coding, so it would really help if there were some examples.

I'm not familiar with your board.

It never fetches.

The Teensy has a pin for a battery; see Teensy® 4.1.

Any example code should work from that perspective; there is an example code in this topic: https://forum.pjrc.com/index.php?threads/teensy-4-1-rtc.60849/, post #19. I can not vow for it.