HOWTO · Raspberry Pi
How to Set Date and Time on Raspberry Pi OS
Learn how to configure a Raspberry Pi OS time zone, set the clock manually, and understand network synchronization and offline time restoration.
On this page
On Raspberry Pi OS, choose the method that matches the problem: use a time-zone setting when local time is offset, set the clock manually when you know the correct time, or consider saved-time restoration for an offline device without a hardware real-time clock. A time-zone change does not set an incorrect clock, and a manual change does not provide ongoing synchronization.
Set Date and Time on Raspberry Pi OS
The Welcome Wizard asks for location, language, and time-zone choices during initial setup. Choose the correct region and time zone so local time is displayed appropriately. If those choices need changing later, use the Raspberry Pi Configuration Tool on the desktop or raspi-config from a terminal. These tools configure the time zone; use the date command to set the clock manually.
A Raspberry Pi may not have a battery-backed hardware real-time clock. When the device starts without a reliable time source, its clock may need attention. The sections below distinguish a manual correction, network time synchronization, and restoring a previously saved time value.
Welcome Wizard
During first-time setup, the Welcome Wizard collects location, language, and time-zone preferences. These choices configure the system’s local time zone. They do not replace a later clock correction if the displayed clock itself is wrong.
Use the Raspberry Pi Configuration Tool
The Raspberry Pi Configuration Tool provides a graphical way to change the time zone. It is for time-zone configuration, not for manually entering a date and time. The exact menu labels can vary between Raspberry Pi OS releases, so use the time-zone setting in the configuration interface available on your installation.
After changing the time zone, check the displayed local time. If the underlying clock is incorrect, correct it separately; changing the time zone only changes how the system presents local time.
Use the raspi-config
raspi-config is a command-line configuration tool that includes time-zone configuration. It can be useful when administering a Raspberry Pi over SSH or using Raspberry Pi OS Lite, where a desktop interface may not be available. Start it from a terminal with sudo raspi-config, then use the time-zone option presented by your installed version. Menu names and navigation may differ by release.
This changes the configured time zone. It does not manually set the clock. If the clock is wrong after the time zone is configured, use the date command or an available network time synchronization service. A time-zone change can alter the local time shown without changing the underlying instant represented by the system clock.
Install ntp Package
Network Time Protocol (NTP) is used to synchronize a computer clock with a network time source. This is different from setting the clock once by hand: synchronization can adjust the clock over time, while a manual change only sets its value at that moment.
The package name ntp should not be taken as a universal installation instruction. This guide does not assume which synchronization service or package is present on a particular Raspberry Pi OS release. Check the documentation for the installed system before changing time services. Network synchronization also serves a different purpose from restoring a saved time value when a device starts offline.
Use the date Command
Use date without setting options to inspect the system’s current date and time. This read-only example displays the clock in a consistent format; it does not change the system:
date '+%Y-%m-%d %H:%M:%S %Z'
To set both the date and time manually, use sudo and replace the placeholders with the intended values in YYYY-MM-DD HH:MM:SS order: sudo date -s 'YYYY-MM-DD HH:MM:SS'. For example, sudo date -s '2026-10-25 14:30:00' sets the clock to the specified date and time. To set only the time, use sudo date -s '14:30:00'.
These setting commands require administrative privileges and change the system clock. Choose the correct local time zone separately so the system displays local time as intended. A manual setting does not keep the clock synchronized afterward; use a configured synchronization service for ongoing network synchronization. The read-only date example above was executed successfully. The manual date-and-time and time-only setting commands are illustrations and were not executed.
Install fake-hwclock
fake-hwclock refers to a software approach for saving a time value and restoring it during startup on a system without a hardware real-time clock. This can help provide a starting time when a device is offline, but a saved value is not a hardware clock and does not synchronize the clock with a network time source. It should not be treated as a source of guaranteed accurate time.
Package availability and setup depend on the installed system, so this guide does not provide an installation command or assume that fake-hwclock is present. Consult documentation for the specific Raspberry Pi OS release before configuring time-restoration software.
Conclusion
For a local-time offset, configure the time zone with the Raspberry Pi Configuration Tool or raspi-config. To correct the clock to a known value, use sudo date -s with the desired date and time. For ongoing correction, use the network synchronization service supported by the installed system; for an offline startup without a hardware real-time clock, saved-time restoration has a narrower role and does not provide network accuracy.