diff options
| author | default <nobody@localhost> | 2025-04-13 14:12:37 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-04-13 14:12:37 +0200 |
| commit | 81538904210e9092760ce7c6b043eaaa166509b6 (patch) | |
| tree | 69f924a63fc8e5ef8f9832044a4b36e2baeb3efc | |
| parent | 29c9d6c166206f06c138c65b23c92f1b1db419a4 (diff) | |
More timezone tweaks.
| -rw-r--r-- | html.c | 2 | ||||
| -rw-r--r-- | xs_time.h | 38 |
2 files changed, 31 insertions, 9 deletions
@@ -4369,7 +4369,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, if (t != 0) { const char *tz = xs_dict_get_def(snac.config, "tz", "UTC"); - t += xs_tz_offset(tz); + t -= xs_tz_offset(tz); xs *iso_date = xs_str_iso_date(t); msg = xs_dict_set(msg, "published", iso_date); @@ -116,7 +116,36 @@ struct { const char *tz; /* timezone name */ float h_offset; /* hour offset */ } xs_tz[] = { - { "UTC", 0 }, + { "UTC", 0 }, + { "WET (Western European Time)", 0 }, + { "WEST (Western European Summer Time)", 1 }, + { "CET (Central European Time)", 1 }, + { "CEST (Central European Summer Time)", 2 }, + { "EET (Eastern European Time)", 2 }, + { "EEST (Eastern European Summer Time)", 3 }, + { "MSK (Moskow Time Zone)", 3 }, + { "EST (Eastern Time Zone)", -5 }, + { "AST (Atlantic Time Zone)", -4 }, + { "ADT (Atlantic Daylight Time Zone)", -3 }, + { "CST (Central Time Zone)", -6 }, + { "CDT (Central Daylight Time Zone)", -5 }, + { "MST (Mountain Time Zone)", -7 }, + { "MDT (Mountain Daylight Time Zone)", -6 }, + { "PST (Pacific Time Zone)", -8 }, + { "PDT (Pacific Daylight Time Zone)", -7 }, + { "AKST (Alaska Time Zone)", -9 }, + { "AKDT (Alaska Daylight Time Zone)", -8 }, + { "China Time Zone", 8 }, + { "IST (Israel Standard Time)", 2 }, + { "IDT (Israel Daylight Standard Time)", 3 }, + { "WITA (Western Indonesia Time)", 8 }, + { "AWST (Australian Western Time)", 8 }, + { "ACST (Australian Eastern Time)", 9.5 }, + { "ACDT (Australian Daylight Eastern Time)", 10.5 }, + { "AEST (Australian Eastern Time)", 10 }, + { "AEDT (Australian Daylight Eastern Time)", 11 }, + { "NZST (New Zealand Time)", 12 }, + { "NZDT (New Zealand Daylight Time)", 13 }, { "GMT", 0 }, { "GMT+1", -1 }, { "GMT+2", -2 }, @@ -144,13 +173,6 @@ struct { { "GMT-12", 12 }, { "GMT-13", 13 }, { "GMT-14", 14 }, - { "GMT-15", 15 }, - { "WET", 0 }, - { "CET", -1 }, - { "AST", -4 }, - { "CST", -6 }, - { "MST", -7 }, - { "PST", -8 }, { NULL, 0 } }; |