Setting the Time zone on a Pihole

I run two Piholes at home because I want to stop malvertising and at least try to block some of the tracking, but I know I can stop all of. I noticed the other day that both showed the correct date, but the time was off by about 4 hours on each of them.  I don’t run them on raspberry pi’s, they are both 1 core/1gb/40gb virtual machines running on a Hyper-V server.  I had never paid attention but figured Hyper-V’s integration would properly set the time, and it had.  But the Ubuntu  server OS was set to the wrong time zone… I had to look up how to change that from the command line, and here is how I set the time zone.

    1. SSH into your pihole (or use the console if you have it hooked up to a monitor).
    2. The following command will tell you the time information: timedatectl status
    3. Now that you know your time details, lets set the time zone.
    4. To list all the time zones (there is a lot!): timedatectl list-timezones
    5. You can also use grep and find your time zone if you don’t want to scroll through every time zone in the world.
    6. Once located, you can set your time zone: sudo timedatectl set-timezone <YOUR TIME ZONE NAME>
    7. So for me, I am in EST and would set it as such: sudo timedatectl set-timezone America/New_York

Good luck, I hope that helps someone else out!


Discover more from Jake's Blog

Subscribe to get the latest posts sent to your email.

Leave a Reply

Discover more from Jake's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading