Question

timestamp for local time

Posted February 24, 2020 373 views
Logging

My auth.log has timestamps for London, how to change that to report in Denver time?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @brucebouck,

Most probably that’s your server’s timezone. You’ll need to change it using SSH. SSH to your droplet,

ssh root@YourDropletIp

As soon as you are in, you can check your timezone using the timedatectl command. The system timezone is configured by symlinking /etc/localtime to a binary timezone identifier in the /usr/share/zoneinfo directory. Alternatively, you can also check the current system’s timezone by displaying the contents of the /etc/timezone file.

cat /etc/timezone

There are a few possibilities to change the timezone. The first one is using timedatectl

timedatectl list-timezones

You’ll something like

Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara

Once you identify which time zone is accurate to your location, run the following command:

sudo timedatectl set-timezone your_time_zone

For example, to change the system’s timezone to Europe/Rome:

sudo timedatectl set-timezone Europe/Rome ```

Run the timedatectl command to verify the changes

Regards,
KDSys
Submit an Answer