converter
hacomono/converter/time
時間とTimezoneを指定して実行すると望んだTimezoneで様々な形式で返す
terraform-time-converter このリポジトリは時間とTimezoneを指定して実行すると望んだTimezoneで様々な形式で返してくれるModuleです。 実行環境 - terraform-docs - version v0.16.0 1f686b1 darwin/amd64 - go - go1.17.5 darwin/amd64 - pre-commit - pre-commit 2.16.0 環境構築 `` $ pre-commit install $ yarn install $ yarn husky init $ yarn husky install ` Usage: ` module "time_converter" { source = "[email protected]:hacomono/terraform-time-converter.git" timezone = "Asia/Tokyo" datetime = "2022-11-22 12:00:00" } output "time_converter" { value = module.time_converter } ` outputs: ` time_converter = { "cron" = "0 3 22 11 " "cron_event_bridge" = "0 3 22 11 ? 2022" "cron_year" = "0 3 22 11 2022" "iso8601" = "2022-11-22T03:00:00+09:00" "no_symbol" = "20221122120000" "rfc1123" = "Tue, 22 Nov 2022 03:00:00 UTC" "rfc2822" = "22 Nov 2022 03:00 UTC" "rfc3339" =
| Name | Type | Description | Default |
|---|---|---|---|
| datetime | string | required | |
| timezone | string | "UTC" |
no_symbol — example: 20221122120000utc_rfc3339 — example: 2022-11-22T03:00:00+00:00rfc850 — example: 22 Nov 2022 12:00 +0900rfc1123 — example: Tue, 22 Nov 2022 12:00:00 +0900utc_rfc850 — example: 22 Nov 2022 03:00 UTCutc_cron_event_bridge — example: 0 3 22 11 ? 2022utc_no_symbol — example: 20221122030000iso8601 — example: 2022-11-22T12:00:00+09:00rfc3339 — example: 2022-11-22T12:00:00+09:00cron_year — example: 0 12 22 11 * 2022cron — example: 0 12 22 11 *utc_iso8601 — example: 2022-11-22T03:00:00Zutc_rfc2822 — example: 22 Nov 2022 03:00 UTCutc_cron_year — example: 0 3 22 11 * 2022utc_cron — example: 0 3 22 11 *rfc2822 — example: 22 Nov 2022 12:00 +0900unix — example: 1669086000utc_rfc1123 — example: Tue, 22 Nov 2022 03:00:00 UTCcron_event_bridge — example: 0 12 22 11 ? 2022