The objective of this tutorial is to show how to set the system time, as well as the date, on a Raspberry Pi. Picking the time zone for your Raspberry Pi is usually done during installation of the operating system, and then the system date and time will be automatically synchronized with time servers online, according to the time zone that you have chosen. However, there are situations that can require us to manually configure the date and time, or change the time zone if switching locations. Let’s see how to do it.
In this tutorial you will learn:
- How to set time zone via raspi-config utility
- How to set time on a Raspberry Pi via timedatectl
- How to manually set time and date via
date
command

Category | Requirements, Conventions or Software Version Used |
---|---|
System | Raspberry Pi |
Software | raspi-config, timedatectl, date |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Set time zone via raspi-config
In case you need to change the time zone on your Raspberry Pi, the easiest way would be using the built in
raspi-config
system utility. Follow the steps below to see how:
- Start by opening a command line terminal and typing:
$ sudo raspi-config
- Next, open the Localisation Options.
Opening the Localisation Options menu from raspi-config - Then, proceed into the Timezone menu.
Open the Timezone settings in raspi-config - Choose the general region where your time zone resides, and then we will make a more granular selection next.
Choose the region for your time zone in raspi-config - Finally, select the city or region that best corresponds to your desired time zone for the Raspberry Pi.
Select the closest city that resides in your desired time zone
Set time on a Raspberry Pi via timedatectl (systemd) or date command
In most cases, changing the time on your Raspberry just boils down to configuring the proper time zone on the device, and we’ll show you how below. But we will also cover the instructions for manually setting your system clock, in case you have a circumstance that requires you to set a different date or time than official time servers.
- Open a terminal and type the following command to see what time zone your Raspberry Pi is currently configured for.
$ timedatectl Local time: Fri 2021-01-08 04:33:12 EST Universal time: Fri 2021-01-08 09:33:12 UTC RTC time: Fri 2021-01-08 09:33:11 Time zone: America/New_York (EST, -0500) System clock synchronized: no NTP service: n/a RTC in local TZ: no
- List available time zones with the following command. Pick one relevant to your location, and we’ll configure your system to that time zone in the next step.
$ timedatectl list-timezones
Use the grep command to narrow down the search. In the example below this command will produce a list of all available time zones in Australia:
$ timedatectl list-timezones | grep Australia Australia/Adelaide Australia/Brisbane Australia/Broken_Hill Australia/Currie Australia/Darwin Australia/Eucla Australia/Hobart Australia/Lindeman Australia/Lord_Howe Australia/Melbourne Australia/Perth Australia/Sydney
- Once you’ve picked the correct time zone from the list, use the following syntax to set your system’s time zone.
$ sudo timedatectl set-timezone Australia/Sydney
- Confirm that the changes have been made with the
timedatectl
command.$ timedatectl Local time: Sat 2021-01-09 14:15:11 AEDT Universal time: Sat 2021-01-09 03:15:11 UTC RTC time: Fri 2021-01-08 09:46:05 Time zone: Australia/Sydney (AEDT, +1100) System clock synchronized: no NTP service: n/a RTC in local TZ: no
- To turn time synchronization on or off, use the respective command below.
$ sudo timedatectl set-ntp on OR $ sudo timedatectl set-ntp off
- If you’d like to set the system clock to some arbitrary date and time, ensure that time synchronization is off (as we’ve shown in the previous step) and use the following
date
command. This command will set the date and time to10 January 2021, 12:00 PM
, but substitute any values you want.$ sudo date -s "10 JAN 2021 12:00:00"
DID YOU KNOW?
If you later decide to turn time synchronization back on, your manual settings that were configured with thedate
command will be disregarded in favor of systemd setting the time and date via official time servers online.
Closing Thoughts
In this tutorial, we saw how to set the system time on a Raspberry Pi. This included changing the time zone via
raspi-config
or timedatectl
, as well as manually configuring an arbitrary date and time by turning off NTP synchronization and using the date
command. In most cases, the raspi-config
will be the easiest way that suffices for almost all scenarios.