zdump时区输出器
功能描述:
使用zdump命令可以在命令行上显示指定的每个区域名称的当前时间。
命令语法:
zdump[选项][区域名]
zdump命令选项含义
选项 | 含义 |
-v | 在命令行上为每个区域名,输出可能的最早时间值,可能的最早时间一天以后的时间值,它们均是能被检测到的精确时刻的1秒前的时间值,可能的最晚时间一天以前的时间值,可能的最晚时间值,如果给出的时间是夏令时,每行以isdst=1结束,否则以isdst=0结束 |
-c<开始年份,结束年份> | 在指定的年份开始的前后,剪切掉冗余的输出 |
例如:查看中国PRC的时区规则。
yexiang@ubuntu:<_Sys>$ zdump -v PRC
PRC -9223372036854775808 = NULL
PRC -9223372036854689408 = NULL
PRC Mon Dec 31 15:54:16 1900 UT = Mon Dec 31 23:59:59 1900 LMT isdst=0 gmtoff=29143
PRC Mon Dec 31 15:54:17 1900 UT = Mon Dec 31 23:54:17 1900 CST isdst=0 gmtoff=28800
PRC Fri May 31 15:59:59 1940 UT = Fri May 31 23:59:59 1940 CST isdst=0 gmtoff=28800
PRC Fri May 31 16:00:00 1940 UT = Sat Jun 1 01:00:00 1940 CDT isdst=1 gmtoff=32400
PRC Sat Oct 12 14:59:59 1940 UT = Sat Oct 12 23:59:59 1940 CDT isdst=1 gmtoff=32400
PRC Sat Oct 12 15:00:00 1940 UT = Sat Oct 12 23:00:00 1940 CST isdst=0 gmtoff=28800
PRC Fri Mar 14 15:59:59 1941 UT = Fri Mar 14 23:59:59 1941 CST isdst=0 gmtoff=28800
PRC Fri Mar 14 16:00:00 1941 UT = Sat Mar 15 01:00:00 1941 CDT isdst=1 gmtoff=32400
PRC Sat Nov 1 14:59:59 1941 UT = Sat Nov 1 23:59:59 1941 CDT isdst=1 gmtoff=32400
PRC Sat Nov 1 15:00:00 1941 UT = Sat Nov 1 23:00:00 1941 CST isdst=0 gmtoff=28800
PRC Fri Jan 30 15:59:59 1942 UT = Fri Jan 30 23:59:59 1942 CST isdst=0 gmtoff=28800
PRC Fri Jan 30 16:00:00 1942 UT = Sat Jan 31 01:00:00 1942 CDT isdst=1 gmtoff=32400
PRC Sat Sep 1 14:59:59 1945 UT = Sat Sep 1 23:59:59 1945 CDT isdst=1 gmtoff=32400
PRC Sat Sep 1 15:00:00 1945 UT = Sat Sep 1 23:00:00 1945 CST isdst=0 gmtoff=28800
PRC Tue May 14 15:59:59 1946 UT = Tue May 14 23:59:59 1946 CST isdst=0 gmtoff=28800
PRC Tue May 14 16:00:00 1946 UT = Wed May 15 01:00:00 1946 CDT isdst=1 gmtoff=32400
PRC Mon Sep 30 14:59:59 1946 UT = Mon Sep 30 23:59:59 1946 CDT isdst=1 gmtoff=32400
PRC Mon Sep 30 15:00:00 1946 UT = Mon Sep 30 23:00:00 1946 CST isdst=0 gmtoff=28800
PRC Mon Apr 14 15:59:59 1947 UT = Mon Apr 14 23:59:59 1947 CST isdst=0 gmtoff=28800
PRC Mon Apr 14 16:00:00 1947 UT = Tue Apr 15 01:00:00 1947 CDT isdst=1 gmtoff=32400
PRC Fri Oct 31 14:59:59 1947 UT = Fri Oct 31 23:59:59 1947 CDT isdst=1 gmtoff=32400
PRC Fri Oct 31 15:00:00 1947 UT = Fri Oct 31 23:00:00 1947 CST isdst=0 gmtoff=28800
PRC Fri Apr 30 15:59:59 1948 UT = Fri Apr 30 23:59:59 1948 CST isdst=0 gmtoff=28800
PRC Fri Apr 30 16:00:00 1948 UT = Sat May 1 01:00:00 1948 CDT isdst=1 gmtoff=32400
PRC Thu Sep 30 14:59:59 1948 UT = Thu Sep 30 23:59:59 1948 CDT isdst=1 gmtoff=32400
PRC Thu Sep 30 15:00:00 1948 UT = Thu Sep 30 23:00:00 1948 CST isdst=0 gmtoff=28800
PRC Sat Apr 30 15:59:59 1949 UT = Sat Apr 30 23:59:59 1949 CST isdst=0 gmtoff=28800
PRC Sat Apr 30 16:00:00 1949 UT = Sun May 1 01:00:00 1949 CDT isdst=1 gmtoff=32400
PRC Fri May 27 14:59:59 1949 UT = Fri May 27 23:59:59 1949 CDT isdst=1 gmtoff=32400
PRC Fri May 27 15:00:00 1949 UT = Fri May 27 23:00:00 1949 CST isdst=0 gmtoff=28800
PRC Sat May 3 17:59:59 1986 UT = Sun May 4 01:59:59 1986 CST isdst=0 gmtoff=28800
PRC Sat May 3 18:00:00 1986 UT = Sun May 4 03:00:00 1986 CDT isdst=1 gmtoff=32400
PRC Sat Sep 13 16:59:59 1986 UT = Sun Sep 14 01:59:59 1986 CDT isdst=1 gmtoff=32400
PRC Sat Sep 13 17:00:00 1986 UT = Sun Sep 14 01:00:00 1986 CST isdst=0 gmtoff=28800
PRC Sat Apr 11 17:59:59 1987 UT = Sun Apr 12 01:59:59 1987 CST isdst=0 gmtoff=28800
PRC Sat Apr 11 18:00:00 1987 UT = Sun Apr 12 03:00:00 1987 CDT isdst=1 gmtoff=32400
PRC Sat Sep 12 16:59:59 1987 UT = Sun Sep 13 01:59:59 1987 CDT isdst=1 gmtoff=32400
PRC Sat Sep 12 17:00:00 1987 UT = Sun Sep 13 01:00:00 1987 CST isdst=0 gmtoff=28800
PRC Sat Apr 16 17:59:59 1988 UT = Sun Apr 17 01:59:59 1988 CST isdst=0 gmtoff=28800
PRC Sat Apr 16 18:00:00 1988 UT = Sun Apr 17 03:00:00 1988 CDT isdst=1 gmtoff=32400
PRC Sat Sep 10 16:59:59 1988 UT = Sun Sep 11 01:59:59 1988 CDT isdst=1 gmtoff=32400
PRC Sat Sep 10 17:00:00 1988 UT = Sun Sep 11 01:00:00 1988 CST isdst=0 gmtoff=28800
PRC Sat Apr 15 17:59:59 1989 UT = Sun Apr 16 01:59:59 1989 CST isdst=0 gmtoff=28800
PRC Sat Apr 15 18:00:00 1989 UT = Sun Apr 16 03:00:00 1989 CDT isdst=1 gmtoff=32400
PRC Sat Sep 16 16:59:59 1989 UT = Sun Sep 17 01:59:59 1989 CDT isdst=1 gmtoff=32400
PRC Sat Sep 16 17:00:00 1989 UT = Sun Sep 17 01:00:00 1989 CST isdst=0 gmtoff=28800
PRC Sat Apr 14 17:59:59 1990 UT = Sun Apr 15 01:59:59 1990 CST isdst=0 gmtoff=28800
PRC Sat Apr 14 18:00:00 1990 UT = Sun Apr 15 03:00:00 1990 CDT isdst=1 gmtoff=32400
PRC Sat Sep 15 16:59:59 1990 UT = Sun Sep 16 01:59:59 1990 CDT isdst=1 gmtoff=32400
PRC Sat Sep 15 17:00:00 1990 UT = Sun Sep 16 01:00:00 1990 CST isdst=0 gmtoff=28800
PRC Sat Apr 13 17:59:59 1991 UT = Sun Apr 14 01:59:59 1991 CST isdst=0 gmtoff=28800
PRC Sat Apr 13 18:00:00 1991 UT = Sun Apr 14 03:00:00 1991 CDT isdst=1 gmtoff=32400
PRC Sat Sep 14 16:59:59 1991 UT = Sun Sep 15 01:59:59 1991 CDT isdst=1 gmtoff=32400
PRC Sat Sep 14 17:00:00 1991 UT = Sun Sep 15 01:00:00 1991 CST isdst=0 gmtoff=28800
PRC 9223372036854689407 = NULL
PRC 9223372036854775807 = NULL
zdump -v 时区名称 | grep 年
yexiang@ubuntu:<_Sys>$ zdump -v PRC | grep 1990
PRC Sat Apr 14 17:59:59 1990 UT = Sun Apr 15 01:59:59 1990 CST isdst=0 gmtoff=28800
PRC Sat Apr 14 18:00:00 1990 UT = Sun Apr 15 03:00:00 1990 CDT isdst=1 gmtoff=32400
PRC Sat Sep 15 16:59:59 1990 UT = Sun Sep 16 01:59:59 1990 CDT isdst=1 gmtoff=32400
PRC Sat Sep 15 17:00:00 1990 UT = Sun Sep 16 01:00:00 1990 CST isdst=0 gmtoff=28800
zdump 时区名称
yexiang@ubuntu:<~>$ zdump china
china Thu Dec 12 02:31:23 2019 china
yexiang@ubuntu:<~>$ zdump Hongkong
Hongkong Thu Dec 12 10:31:33 2019 HKT
yexiang@ubuntu:<~>$ zdump canada
canada Thu Dec 12 02:31:47 2019 canada