日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux系统启用夏令时,在Debian Linux中禁用夏令时

發布時間:2023/12/20 linux 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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永久解決此問題.如何禁用夏令時?

解決方法:

提供無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 .

這將在當前目錄中生成一個名為Tehran-nodst的文件,您可以將其復制到/usr/share / zoneinfo / Asia并鏈接/復制到/ etc / localtime(僅執行最后一次復制也非常好).

標簽:linux,timezone,time

來源: https://codeday.me/bug/20190809/1633438.html

總結

以上是生活随笔為你收集整理的linux系统启用夏令时,在Debian Linux中禁用夏令时的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。