瀏覽代碼

* new timezones and shell prompt enhancement /A

Anton 8 月之前
父節點
當前提交
330fe31753
共有 2 個文件被更改,包括 15 次插入3 次删除
  1. 10 1
      console-terminal/multiclock.py
  2. 5 2
      console-terminal/zshrc-anton.sh

+ 10 - 1
console-terminal/multiclock.py

@@ -4,9 +4,16 @@
 # this script will show time and date in different locations
 # Author: Anton TETERIN
 # web:    https://2dz.fi
+
+#
+# list of zones:
+# >>> from pytz import country_names, country_timezones
+# >>> all_timezones = [country_timezones.get(country) for country in country_names]
+# >>> all_timezones
 #
 
 # 2024-04-28  * init /A
+# 2024-05-22  + doc to list timezones /A
 
 from datetime import datetime
 import pytz
@@ -22,7 +29,9 @@ zones = [
     "Europe/Moscow",
     "Asia/Riyadh",
     "Asia/Dubai",
-    "Asia/Sakhalin"
+    "Asia/Ho_Chi_Minh",
+    "Asia/Bangkok",
+    "Asia/Sakhalin",
 ]
 
 for zone in zones:

+ 5 - 2
console-terminal/zshrc-anton.sh

@@ -1,4 +1,7 @@
+#
+# 2024-05-20  * changed time and date position /A
+#
 # add to ~/.zshrc
-# "source /Users/Shared/dox-prj/InstallAndUse/GitHub/host1/Daily/console-terminal/zshrc-anton.sh"
+# "source /Users/Shared/dox-prj/repos/github.com/github.InstallAndUse.Daily/console-terminal/zshrc-anton.sh"
 
-PROMPT="[%* 20%D] @%m %~ $ "
+PROMPT="[20%D %*] @%m %~ $ "