Command Operation
Operation Check
Run the rtc command to get the current time from the RTC module:
You can set the date and time on the RTC module by specifying the date and time as an argument to the rtc command:
Time Synchronization with NTP Server
If your Pico board is connected to Wi-Fi (see here), you can use the ntp command with the -r option to get the correct time from an NTP server and set it on the RTC module:
File Operations
Let's create a file and check that the timestamp is recorded correctly:
Command Reference
rtc
Help of the Command
Usage: rtc [OPTION]... [DATE] [TIME]
Options:
-h --help prints this help
-v --verbose verbose output
Set or get the RTC time. If no argument is given, it prints the current time.