# How do you set the time?

**URL:** <https://forum.onefinitycnc.com/t/how-do-you-set-the-time/19256>\
**Category:** Firmware (BB Buildbotics) (Discontinued)\
**Created:** [March 6, 2023, 8:26pm UTC](https://forum.onefinitycnc.com/t/how-do-you-set-the-time/19256 "2023-03-06T20:26:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [March 8, 2023, 2:56am UTC](https://forum.onefinitycnc.com/t/how-do-you-set-the-time/19256/4 "2023-03-08T02:56:27Z")

</div>

Hey Dale, hey Thomas @Thomasaburt, hey Scott @ssamborn, hey all,

to adjust timezone, time and date, either you open a terminal window (on the Onefinity Controller, hold down “Ctrl” and then click “T” and then “C” (type “exit” to exit again)) or you log in with a [ssh](https://en.wikipedia.org/wiki/Secure_Shell) (user: bbmc, password: onefinity), and then do:

```sh
sudo -i
raspi-config

```

Then you can choose “Localisation Options – Set up language and regional settings to match your location” \> “Change Timezone – Set up **timezone** to match your location”

 ![Screenshot_2023-03-08_03-52-04__Onefinity_Controller_Timezone](https://us1.discourse-cdn.com/flex022/uploads/onefinitycnc/original/3X/8/1/810f8e5f177d4700936aa66194dd73a493e44bb8.png)

You may also use &nbsp; `tzselect` &nbsp; instead of &nbsp; `raspi-config` &nbsp;.

If the **time** itself is wrong, you can set it with &nbsp; `date --set=STRING` &nbsp; . The command &nbsp; `man date` &nbsp; shows details on what to insert in place of “STRING”:

> DATE STRING
> 
> The --date=STRING is a mostly free format human readable date string such as “Sun, 29 Feb 2004 16:21:42 -0800” or “2004-02-29 16:21:42” or even “next Thursday”. A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.

( …which means the command &nbsp; `info date` &nbsp; )

#### Example

`date --set="Mar 8 04:10"`

Note that the Raspberry Pi has no [real-time clock](https://en.wikipedia.org/wiki/Real-time_clock) onboard. The Onefinity Controller uses [fake-hwclock](https://manpages.debian.org/stretch/fake-hwclock/fake-hwclock.8.en.html) which means the clock will always be relatively inaccurate as long your Onefinity Controller has no access to the internet. If it has, the clock is synchronized through [systemd-timesyncd.service](https://www.man7.org/linux/man-pages/man8/systemd-timesyncd.8.html). The most precise way to have time and date on your computer, besides to attaching a [long-wave radio clock](https://en.wikipedia.org/wiki/Radio_clock) module (as [shown here](https://forum.onefinitycnc.com/t/real-time-clock-rtc-for-the-raspberry-pi-controller/15431/2)) that usually receives its signal from an atomic clock, is to install [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol) support with the ‘ntp’ package (available as normal package from the Raspi OS repository). (See also [Network Time Foundation’s NTP Support Wiki](https://support.ntp.org))

You can at any time check the **time status on the Onefinity Controller** with the command [timedatectl](https://manpages.debian.org/stretch/systemd/timedatectl.1.en.html):

```shell
bbmc@onefinity:~ $ timedatectl status
      Local time: Wed 2023-03-08 05:18:01 CET
  Universal time: Wed 2023-03-08 04:18:01 UTC
        RTC time: n/a
       Time zone: Europe/Berlin (CET, +0100)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no

```

On this output of timedatectl, you can see that

1. a real-time clock is not available,
2. _systemd-timesyncd.service_ is on but
3. it could not connect to a NTP server in the internet.

Without access to the internet, the clock cannot be synchronized, and _fake-hwclock_ manages the time and date.

#### Further reading

> [@Onefinity with windows xp/vista/7/8](https://forum.onefinitycnc.com/t/onefinity-with-windows-xp-vista-7-8/18175/12):
>
> > [@Onefinity with windows xp/vista/7/8](https://forum.onefinitycnc.com/t/onefinity-with-windows-xp-vista-7-8/18175/11):
> >
> > How to connect with ssh?
> 
> → [Best “SSH Clients” for Windows](https://metager.org/meta/meta.ger3?eingabe=Best%20%22SSH%20Clients%22%20for%20Windows&focus=web)

---

_[View the full topic](https://forum.onefinitycnc.com/t/how-do-you-set-the-time/19256)._
