如何在Ubuntu中显示当前的时间配置,例如时区?
cat /etc/timezone
grep UTC /etc/default/rcS
date
# hardware clock
sudo hwclock --show
hwclock
这个部分,但实际上那正是我在寻找的东西。 - icc97timedatectl
(在命令行/终端中):$ timedatectl
Local time: Thu 2014-07-24 19:51:23 IST
Universal time: Thu 2014-07-24 14:21:23 UTC
Timezone: Asia/Kolkata (IST, +0530)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
timedatectl
命令,请参考以下链接:http://askubuntu.com/q/622721/132098 - Abdulldate
是有效的:
Fri 22 Nov 2019 04:31:50 PM UTC
info date
,例如date +'%z'
。$ curl https://ipapi.co/timezone
America/Chicago
或者:
$ curl http://ip-api.com/line?fields=timezone
America/Chicago
$ grep `date +%Z` /etc/timezone
Etc/UTC
如果您已安装了PowerShell:
PS> Get-TimeZone
Id : Europe/Vilnius
DisplayName : (UTC+02:00) Eastern European Standard Time
StandardName : Eastern European Standard Time
DaylightName : Eastern European Summer Time
BaseUtcOffset : 02:00:00
SupportsDaylightSavingTime : True
Get-TimeZone
cmdlet 的文档
cat /etc/sysconfig/clock
命令的输出是什么样子? - belacqua