सही सिस्टम समय लॉग, SSL प्रमाणपत्र और क्रोन कार्यों के लिए महत्वपूर्ण है।
📋 पूर्वापेक्षाएँ
- root/sudo VPS, SSH कनेक्शन
- Ubuntu/Debian
🔍 वर्तमान टाइमज़ोन जाँचें
Bash1# Display current timezone 2timedatectl 3 4# Or simply 5date 6 7# Display only the timezone 8timedatectl | grep "Time zone"
🌍 विधि 1: timedatectl (अनुशंसित)
Bash1# 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
Bash1# Set timezone to Europe/Paris 2sudo timedatectl set-timezone Europe/Paris 3 4# Verify that the change was applied 5timedatectl
उदाहरण आउटपुट:
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
🔧 विधि 2: प्रतीकात्मक लिंक
Bash1# List available timezones 2ls /usr/share/zoneinfo/Europe/ 3 4# Verify that Europe/Paris exists 5ls -la /usr/share/zoneinfo/Europe/Paris
Bash1# 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
Bash1# Edit the timezone file 2echo "Europe/Paris" | sudo tee /etc/timezone 3 4# Verify the content 5cat /etc/timezone
✅ सत्यापन
Bash1# Display date and time with timezone 2date 3 4# Display all time information 5timedatectl 6 7# Display UTC time 8date -u
Bash1# Verify the symbolic link 2ls -la /etc/localtime 3 4# Should display something like: 5# /etc/localtime -> /usr/share/zoneinfo/Europe/Paris
🕐 डेलाइट सेविंग (DST)
Europe/Paris स्वचालित रूप से CET (UTC+1) और CEST (UTC+2) संभालता है।
🔄 NTP सिंक्रनाइज़ेशन
Bash1# Check if NTP is active 2timedatectl status 3 4# If NTP is not active, enable it 5sudo timedatectl set-ntp true
Bash1# 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
🎯 अन्य फ़्रांसीसी टाइमज़ोन
Bash1# 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
📝 उपयोगी कमांड
Bash1# 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
🔍 समस्या निवारण
Bash1# 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
Bash1# 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
✅ सर्वोत्तम अभ्यास
- timedatectl उपयोग करें
- NTP सक्षम रखें
- समय मैन्युअल न बदलें — NTP पर भरोसा करें
❓ अक्सर पूछे जाने वाले प्रश्न
प्र: CET और CEST में अंतर?
उ: सर्दी (UTC+1) और गर्मी (UTC+2) — Europe/Paris स्वचालित संभालता है।
प्र: NTP सही काम कर रहा है?
उ: timedatectl status — "NTP service: active" और "System clock synchronized: yes"
सही समय! 🕐