Debian Linuxで夏時間を無効にする

Debian Linuxで夏時間を無効にする

私のシステムは夏時間を使用したくありません。

root@ali-debserver:~# cat /etc/timezone
Asia/Tehran

root@ali-debserver:~# cat /etc/default/rcS
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
#TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no

# do not allow users to log in until the boot has completed
#DELAYLOGIN=no

# be more verbose during the boot process
#VERBOSE=no

# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no

ntpこの問題を永久に解決する方法はありませんtzdate。夏時間を無効にする方法は?

ベストアンサー1

DSTによって制限されず、次のGMTオフセットのみを定義するタイムゾーン定義が提供されますEtc/GMT±X

$ date
Mon Apr  7 11:08:56 CEST 2014
$ TZ=Etc/GMT-1 date
Mon Apr  7 10:09:16 GMT-1 2014
$

必要なものをリンク/コピーしても/etc/localtime大丈夫で、DSTの影響を受けません。

$ ln -s /usr/share/zoneinfo/Etc/GMT-1 /etc/localtime

編集する:整数以外のオフセットの場合は、直接調べる必要があります。必要なオフセットを定義するために独自のゾーンファイルを作成できます。ファイルに次の行を入力してください。

# Zone  NAME          GMTOFF  RULES FORMAT [UNTIL]
Zone    Tehran-nodst  3:25:44 -     LMT    1916
                      3:25:44 -     TMT    1946    # Tehran Mean Time
                      3:30    -     IRST   1977 Nov
                      4:00    -     IRST   1979
                      3:30    -     IRST

そして走る

$ zic -d . <filename>

これにより、コピーしてリンク/コピーできるTehran-nodst現在のディレクトリに呼び出されるファイルが生成されます(最後のコピーのみを実行してもかまいません)。/usr/share/zoneinfo/Asia/etc/localtime

おすすめ記事