天天看點

UTC 時間轉換 All In One

UTC 時間轉換 All In One

UTC 時間轉換 All In One

攝氏度 ℃ & 華氏 ℉

UTC 時間轉換 All In One

UTC 時間轉換 All In One

http://www.timebie.com/cn/stduniversal.php

UTC 時間

世界的每個地區都有自己的本地時間,在 Internet 及無線電通信時,時間的統一非常重要!

整個地球分為二十四時區,每個時區都有自己的本地時間。

在國際無線電通信中,為統一而普遍使用一個标準時間,稱為通用協調時 (UTC, Universal Time Coordinated)。

UTC 與格林尼治平均時 (GMT, Greenwich Mean Time)一樣,都與英國倫敦的本地時相同。

UTC 與 GMT 含義完全相同。

格林尼治時間 0

http://zh.thetimenow.com/utc/coordinated_universal_time

中原標準時間

+8

時間轉換

UTC 時間轉換 All In One

00:08 => 09:03:55/ 09:04:32 / 09:01:06

UTC 時間轉換 All In One

23:00 => 07:09:31

23:59 => 08:00:00 ???

schedule:
    - cron: \'8 0 * * *\'

           
schedule:
    - cron: \'0 23 * * *\'

           
schedule:
    - cron: \'59 23 * * *\'

           

溫度機關轉換

攝氏度 ℃ & 華氏 ℉

32 華氏溫标 === 0 攝氏溫标

轉換公式 Formula

(32°F − 32) × 5/9 = 0°C

UTC 時間轉換 All In One

demo

bug
UTC 時間轉換 All In One
OK
UTC 時間轉換 All In One

weather.sh

#!/bin/sh

# ???
set -eux

# 設定 env
LANGUAGE="zh-CN"
CITY=Shanghai
UNIT=m
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"

# 文檔見 wttr.in
curl \
  -H "Accept-Language: $LANGUAGE" \
  -H "User-Agent: $UA" \
  -o result.html \
  wttr.in/$CITY
  # wttr.in/$CITY?format=4\&$UNIT

           

https://github.com/xgqfrms/weather-email-action/blob/main/weather.sh

/Users/xgqfrms-mbp/Documents/GitHub/gitHub-secrets-all-in-one/weather.sh

#!/bin/sh

# ???
set -eux

# 設定 env
LANGUAGE="zh-CN"
CITY=Shanghai
# m === °C
UNIT=m
# u === °F (default)
# UNIT=u
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"

# 文檔見 wttr.in
curl \
  -H "Accept-Language: $LANGUAGE" \
  -H "User-Agent: $UA" \
  -o result.html \
  wttr.in/$CITY?$UNIT
  # wttr.in/$CITY
  # wttr.in/$CITY?format=4\&$UNIT

# refs
# https://github.com/xgqfrms/weather-email-action/issues/3

           

refs

https://github.com/xgqfrms/weather-email-action/issues/3

https://github.com/chubin/wttr.in/issues/553

UTC 時間轉換 All In One

©xgqfrms 2012-2020

www.cnblogs.com 釋出文章使用:隻允許注冊使用者才可以通路!