Time

Hello DietPi Community! Firstly, let me say that my experience with DietPi has been so much better than with Raspbian. One of my favorite features is that SSH is enabled by default so I can get started right away. Not everyone has a second monitor and keyboard just lying around. As a thank you, I am contributing the BAT of my Brave Rewards to DietPi. It’s all I can do at the moment.

I have come to the DietPi forum today because I need clarification on the system time. If I am not mistaken, DietPi is based on Debian, and Debian seems to get its system time information from something called the TZ Database. I want to use a Raspberry Pi as a NodeRED server and I am assuming NodeRED uses the system time for anything time-related. So, does DietPi set and synchronize its system time to the local time on its own, or does it need my help? Furthermore, if the system time has indeed been set to the local time, can it handle DST (Daylight Savings Time)? I am working on a project where the local time is critical. Being off by an hour can be catastrophic.

This seems useful: https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-debian-10

Thank you for any advice you can give me.
Respectfully,
Krisberg

If all network settings are correct, DietPi will synchronize the time over the network. There are 3-4 options for you to configure how time will be synchronized in dietpi-config. Other than that, daylight saving works of course too.

To be more specific, DietPi will synchronize system time once a day automatically (default setting). However we will not set any time zone. Default time zone we use is Europe/London. This can be changed before first initial boot using dietpi.txt

# Timezone eg: "Europe/London" / "America/New_York" | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
AUTO_SETUP_TIMEZONE=Europe/London

or using dietpi-config > 5 : Language/Regional Options later on.

As well you are free to select your own or a specific time server if needed.

Thank you Joulinar!

Using dietpi-config > 5 : Language/Regional Options and changing it to my region seems to give me my local time. I was able to access the system time from NodeRED with the exec node and using the date command.


PS: How did you get your cool code text in your comment, like where I have underlined in my comment?

if you create a post, there is a menu bar above. Simply select icode to have specific words in green

 [icode]text[/icode]