]> zdv2.bktei.com Git - BK-2020-03.git/blobdiff - user/bkdatev
fix(user/bkdatev):Use leap seconds via 'TZ=right/UTC'
[BK-2020-03.git] / user / bkdatev
index cea68837990e350b8c4c106b11097ea985010d46..808ab9e144ba832dfb50fbbc621f8fc93d2e5ef2 100755 (executable)
@@ -2,11 +2,12 @@
 # Desc: Baltakatei's verbose date command
 # Usage: bkdatev [args]
 # Example: bkdatev --date="2001-09-11T09:02:59-04"
 # Desc: Baltakatei's verbose date command
 # Usage: bkdatev [args]
 # Example: bkdatev --date="2001-09-11T09:02:59-04"
-# Version: 1.0.0
+# Version: 1.0.1
 # Depends: GNU Coreutils 8.32, Bash 3.2.57
 # Ref/Attrib: [1] "ISO 8601". Wikipedia. https://en.wikipedia.org/wiki/ISO_8601
 #             [2] "Changing the Locale in Wine" https://stackoverflow.com/a/16428951
 #             [3] "Shanghai vs Beijing" https://bugs.launchpad.net/ubuntu/+source/libgweather/+bug/228554
 # Depends: GNU Coreutils 8.32, Bash 3.2.57
 # Ref/Attrib: [1] "ISO 8601". Wikipedia. https://en.wikipedia.org/wiki/ISO_8601
 #             [2] "Changing the Locale in Wine" https://stackoverflow.com/a/16428951
 #             [3] "Shanghai vs Beijing" https://bugs.launchpad.net/ubuntu/+source/libgweather/+bug/228554
+#             [4] “"right" tz database (zoneinfo) files and GPS-based NTP” https://www.ucolick.org/~sla/leapsecs/right+gps.html
 # Notes:  * Check `ls -R /usr/share/zoneinfo` for time zone names.
 #         * Check `cat /usr/share/i18n/SUPPORTED` for supported locales.
 #         * For list of valid locales, see: https://manpages.ubuntu.com/manpages/bionic/man3/DateTime::Locale::Catalog.3pm.html
 # Notes:  * Check `ls -R /usr/share/zoneinfo` for time zone names.
 #         * Check `cat /usr/share/i18n/SUPPORTED` for supported locales.
 #         * For list of valid locales, see: https://manpages.ubuntu.com/manpages/bionic/man3/DateTime::Locale::Catalog.3pm.html
@@ -143,7 +144,7 @@ main() {
 
     # UTC (pop. (2021): 7,837,000,000)
     (
 
     # UTC (pop. (2021): 7,837,000,000)
     (
-        export TZ=UTC;
+        export TZ=right/UTC; # See [4]
         id="UTC";
         fs_3="+%s seconds since 1970-01-01T00:00+00";
         print_dateline "$@";
         id="UTC";
         fs_3="+%s seconds since 1970-01-01T00:00+00";
         print_dateline "$@";