The Location Services Annoyance
Modern versions of Ubuntu Linux feature an automatic time zone setting that relies on Location Services. When connected to the internet, Ubuntu checks your IP address, queries a geolocation database to determine your physical location on the globe, and automatically shifts your system clock to match the local time zone. While this is a brilliant feature for business travelers who frequently jump across continents with a laptop, it can be infuriating if you are using a VPN. If you connect to a VPN server in Japan for privacy reasons, Ubuntu might detect the Japanese IP address, assume you have traveled to Tokyo, and instantly shift your system clock 12 hours into the future, ruining your calendar alerts and cron job schedules.
How to Disable Auto-Time Zone in the GNOME GUI
If you are using the standard Ubuntu desktop, disabling this feature is straightforward via the graphical settings menu.
1. Open the Settings application.
2. In the left-hand sidebar, scroll down and click on Date & Time.
3. Look for the toggle switch labelled Automatic Time Zone.
4. Click the switch to turn it Off.
5. Once disabled, the “Time Zone” field below it becomes clickable. Click it to manually search for and select your permanent, correct home time zone.
Note: You should leave the “Automatic Date & Time” toggle turned ON. This ensures your clock remains perfectly accurate by syncing with NTP servers; it just prevents the system from randomly jumping to a different global timezone based on your IP address.
How to Disable Auto-Time Zone via the Terminal (timedatectl)
If you are running an Ubuntu Server without a GUI, or prefer command-line administration, you can control the time zone services using the `timedatectl` utility.
1. Open your terminal.
2. To see the current status of your time services, run:
timedatectl status
3. You cannot strictly disable “location checking” from the command line in the same way the GUI does, because the GUI location service is part of GNOME, not the base OS. However, you can manually force the time zone, which overrides the system’s guessing.
4. First, list all available time zones so you know the exact spelling:
timedatectl list-timezones | grep -i your_city (e.g., grep -i new_york)
5. Set the time zone permanently using the exact string you found:
sudo timedatectl set-timezone America/New_York
By manually asserting the time zone through `timedatectl`, you lock the system into that locale, ignoring whatever IP address your VPN connection might be broadcasting to the GNOME location services.