InfrawireInfrawire LogoDocumentation
Appeler

Configure Timezone to Paris

This guide will teach you how to configure your VPS server timezone to the Paris timezone (Europe/Paris) so that the system time is correctly synchronized.

📋 Prerequisites

  • A VPS server with root or sudo access
  • An active SSH connection
  • Ubuntu/Debian (commands are adapted for these distributions)

🔍 Check Current Timezone

Before changing the timezone, check which one is currently configured:

Bash
1# Display current timezone 2timedatectl 3 4# Or simply 5date 6 7# Display only the timezone 8timedatectl | grep "Time zone"

List Available Timezones

Bash
1# List all available timezones 2timedatectl list-timezones 3 4# Filter to find European timezones 5timedatectl list-timezones | grep Europe 6 7# Search specifically for Paris 8timedatectl list-timezones | grep Paris

Configure Paris Timezone

Bash
1# Set timezone to Europe/Paris 2sudo timedatectl set-timezone Europe/Paris 3 4# Verify that the change was applied 5timedatectl

You should see something like:

               Local time: Mon 2026-01-11 14:30:00 CET
           Universal time: Mon 2026-01-11 13:30:00 UTC
                 RTC time: Mon 2026-01-11 13:30:00
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

If timedatectl is not available, you can use the traditional method:

Step 1: Identify the Timezone

Bash
1# List available timezones 2ls /usr/share/zoneinfo/Europe/ 3 4# Verify that Europe/Paris exists 5ls -la /usr/share/zoneinfo/Europe/Paris
Bash
1# Backup the old timezone (optional) 2sudo mv /etc/localtime /etc/localtime.backup 3 4# Create the symbolic link to the Paris timezone 5sudo ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime 6 7# Verify the change 8date

Step 3: Update /etc/timezone File (Debian/Ubuntu)

Bash
1# Edit the timezone file 2echo "Europe/Paris" | sudo tee /etc/timezone 3 4# Verify the content 5cat /etc/timezone

✅ Verification

Check Current Time

Bash
1# Display date and time with timezone 2date 3 4# Display all time information 5timedatectl 6 7# Display UTC time 8date -u

Verify Timezone is Correct

Bash
1# Verify the symbolic link 2ls -la /etc/localtime 3 4# Should display something like: 5# /etc/localtime -> /usr/share/zoneinfo/Europe/Paris

🕐 Daylight Saving Time (DST) Management

The Europe/Paris timezone automatically handles daylight saving time (CET/CEST):

  • CET (Central European Time) : UTC+1 (winter)
  • CEST (Central European Summer Time) : UTC+2 (summer)

The system automatically adjusts the time twice a year.

Verify Daylight Saving Time

Bash
1# Display detailed information 2timedatectl 3 4# Verify the change date 5zdump -v Europe/Paris | grep 2024

🔄 NTP Synchronization

To keep the time accurate, make sure NTP synchronization is enabled:

Check NTP Status

Bash
1# Check if NTP is active 2timedatectl status 3 4# If NTP is not active, enable it 5sudo timedatectl set-ntp true

Install and Configure NTP (if necessary)

Bash
1# Install NTP 2sudo apt update 3sudo apt install ntp -y 4 5# Check status 6systemctl status ntp 7 8# Enable NTP on boot 9sudo systemctl enable ntp 10sudo systemctl start ntp

🎯 Other French Timezones

If you need another French timezone:

Bash
1# Mainland (Paris) 2sudo timedatectl set-timezone Europe/Paris 3 4# Antilles (Guadeloupe, Martinique) 5sudo timedatectl set-timezone America/Martinique 6 7# French Guiana 8sudo timedatectl set-timezone America/Cayenne 9 10# Réunion 11sudo timedatectl set-timezone Indian/Reunion 12 13# New Caledonia 14sudo timedatectl set-timezone Pacific/Noumea 15 16# French Polynesia 17sudo timedatectl set-timezone Pacific/Tahiti

📝 Useful Commands

Display Time in Different Timezones

Bash
1# Local time (Paris) 2date 3 4# UTC time 5date -u 6 7# Time in a specific timezone 8TZ='America/New_York' date 9TZ='Asia/Tokyo' date

Warning: Manually modifying the time is not recommended if NTP is active, as NTP will automatically reset it to the correct time.

Bash
1# Modify time (format: YYYY-MM-DD HH:MM:SS) 2sudo timedatectl set-time "2026-01-11 14:30:00" 3 4# Modify only the date 5sudo timedatectl set-time "2026-01-11" 6 7# Modify only the time 8sudo timedatectl set-time "14:30:00"

🔍 Troubleshooting

Problem: Time Doesn't Synchronize

Bash
1# Check NTP status 2timedatectl status 3 4# Enable NTP if disabled 5sudo timedatectl set-ntp true 6 7# Check connection to NTP servers 8sudo ntpq -p

Problem: Timezone Doesn't Change

Bash
1# Verify that timedatectl works 2sudo timedatectl set-timezone Europe/Paris 3 4# Verify the symbolic link 5ls -la /etc/localtime 6 7# If necessary, recreate the link manually 8sudo rm /etc/localtime 9sudo ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime

Problem: Time is Incorrect After Reboot

Bash
1# Enable NTP for automatic synchronization 2sudo timedatectl set-ntp true 3 4# Install chrony (NTP alternative) 5sudo apt install chrony -y 6sudo systemctl enable chrony 7sudo systemctl start chrony

✅ Best Practices

  • Use timedatectl : It's the modern and recommended method
  • Enable NTP : To keep time synchronized automatically
  • Check regularly : System time is important for logs and SSL certificates
  • Don't modify manually : Let NTP handle synchronization

🆘 Troubleshooting

Verify Complete Configuration

Bash
1# Verify all time information 2timedatectl 3 4# Check configuration files 5cat /etc/timezone 6ls -la /etc/localtime 7 8# Check TZ environment variable 9echo $TZ

Complete Reset

If you have problems, you can reset:

Bash
1# Enable NTP 2sudo timedatectl set-ntp true 3 4# Redefine timezone 5sudo timedatectl set-timezone Europe/Paris 6 7# Verify 8timedatectl 9date

📚 Additional Resources

❓ Frequently Asked Questions

Q: What is the difference between CET and CEST?
A: CET (Central European Time) is winter time (UTC+1) and CEST (Central European Summer Time) is summer time (UTC+2). The system automatically changes twice a year.

Q: Should I use Europe/Paris or CET directly?
A: Always use Europe/Paris as it includes daylight saving time rules automatically. Don't use CET/CEST directly.

Q: Does the time change automatically with daylight saving time?
A: Yes, if you use Europe/Paris, the system automatically adjusts the time during the daylight saving time transition.

Q: How do I check if NTP is working correctly?
A: Use timedatectl status and verify that "NTP service" is "active" and "System clock synchronized" is "yes".

Q: Can I use another timezone on my VPS?
A: Yes, replace Europe/Paris with the desired timezone in the timedatectl set-timezone command.