When Turkey announced permanent GMT+3 adoption without Daylight Saving Time (DST) changes, Linux administrators faced an unexpected challenge. The existing Europe/Istanbul
timezone still contains DST transition rules in its zoneinfo file, which would incorrectly switch servers back to GMT+2 on October 30, 2016.
The apparent "backwards" offset behavior when using Etc/GMT+3
stems from POSIX standards. In the tzdata implementation:
# POSIX specifies GMT+n means n hours behind UTC
# While GMT-n means n hours ahead of UTC
# This is counterintuitive but follows historical conventions
Here are three technical approaches to implement permanent GMT+3:
Option 1: Create Custom Timezone
# Create custom timezone definition
echo "GMT+3 3" > /etc/localtime
# Alternative method using timedatectl
timedatectl set-timezone Etc/GMT-3
Option 2: UTC Base with Offset
# Set system to UTC and handle offset in applications
timedatectl set-timezone UTC
# For cron jobs:
CRON_TZ=GMT+3
0 8 * * * command # Runs at 8AM Turkey time
Option 3: TZ Environment Variable
# Temporary solution for testing
export TZ="GMT+3"
# Permanent solution in bashrc
echo 'export TZ="GMT+3"' >> /etc/profile
Always verify timezone changes with multiple tools:
# Check current settings
date
timedatectl
zdump -v /etc/localtime | grep 2016
# Test future date transitions
date -d "Oct 30 2016" +"%F %T %Z"
For applications sensitive to timezone changes:
# Java applications may need:
-Duser.timezone=GMT+3
# PHP applications require:
date_default_timezone_set('GMT+3');
When Turkey announced the permanent adoption of GMT+3 without Daylight Saving Time (DST) changes, many Linux administrators faced a critical challenge. The standard Europe/Istanbul
timezone in tzdata still contains DST transition rules that would automatically switch back to GMT+2 on October 30, 2016.
The unexpected behavior occurs when using the Etc/GMT+3
timezone:
# ln -s /usr/share/zoneinfo/Etc/GMT+3 /etc/localtime
# date
Wed Sep 21 05:14:24 GMT+3 2016
# date -u
Wed Sep 21 08:14:26 UTC 2016
This shows GMT+3 appearing to be 3 hours behind UTC instead of ahead. The reason lies in how POSIX timezones are defined:
The Etc/GMT*
zones follow the POSIX standard where:
- GMT+3 actually means UTC-3 (counter-intuitive but specified in POSIX)
- GMT-3 means UTC+3
For a true GMT+3 without DST, you have several options:
Option 1: Create a Custom Timezone
# Create a new timezone definition
echo "GMT+3 3" > /etc/localtime
# Or alternatively
ln -sf /usr/share/zoneinfo/Etc/GMT-3 /etc/localtime
Option 2: Use timedatectl (on systemd systems)
timedatectl set-timezone Etc/GMT-3
timedatectl set-local-rtc 0
Option 3: Manual UTC Offset
# Set TZ environment variable
export TZ='<+03>-3'
# Or in scripts
#!/bin/bash
TZ='<+03>-3' ./your_script.sh
After implementation, verify with:
# Check current time
date
date -u
# Check timezone info
zdump -v /etc/localtime | grep 2016
# Alternative verification
timedatectl show | grep Timezone
For servers that must maintain GMT+3 permanently:
# Edit /etc/timezone (Debian/Ubuntu)
echo "Etc/GMT-3" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Or on RHEL/CentOS
rm -f /etc/localtime
ln -sf /usr/share/zoneinfo/Etc/GMT-3 /etc/localtime
Remember to update cron jobs that might be affected:
# Restart cron after timezone changes
systemctl restart cron
# Or on older systems
/etc/init.d/cron restart
Ensure NTP is properly configured:
# Check NTP sync
ntpq -p
# Or with chrony
chronyc tracking
chronyc sources