commit 8153890
default
·
2025-04-13 12:12:37 +0000 UTC
parent 29c9d6c
More timezone tweaks.
M
html.c
+1,
-1
1@@ -4369,7 +4369,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
2 if (t != 0) {
3 const char *tz = xs_dict_get_def(snac.config, "tz", "UTC");
4
5- t += xs_tz_offset(tz);
6+ t -= xs_tz_offset(tz);
7
8 xs *iso_date = xs_str_iso_date(t);
9 msg = xs_dict_set(msg, "published", iso_date);
+30,
-8
1@@ -116,7 +116,36 @@ struct {
2 const char *tz; /* timezone name */
3 float h_offset; /* hour offset */
4 } xs_tz[] = {
5- { "UTC", 0 },
6+ { "UTC", 0 },
7+ { "WET (Western European Time)", 0 },
8+ { "WEST (Western European Summer Time)", 1 },
9+ { "CET (Central European Time)", 1 },
10+ { "CEST (Central European Summer Time)", 2 },
11+ { "EET (Eastern European Time)", 2 },
12+ { "EEST (Eastern European Summer Time)", 3 },
13+ { "MSK (Moskow Time Zone)", 3 },
14+ { "EST (Eastern Time Zone)", -5 },
15+ { "AST (Atlantic Time Zone)", -4 },
16+ { "ADT (Atlantic Daylight Time Zone)", -3 },
17+ { "CST (Central Time Zone)", -6 },
18+ { "CDT (Central Daylight Time Zone)", -5 },
19+ { "MST (Mountain Time Zone)", -7 },
20+ { "MDT (Mountain Daylight Time Zone)", -6 },
21+ { "PST (Pacific Time Zone)", -8 },
22+ { "PDT (Pacific Daylight Time Zone)", -7 },
23+ { "AKST (Alaska Time Zone)", -9 },
24+ { "AKDT (Alaska Daylight Time Zone)", -8 },
25+ { "China Time Zone", 8 },
26+ { "IST (Israel Standard Time)", 2 },
27+ { "IDT (Israel Daylight Standard Time)", 3 },
28+ { "WITA (Western Indonesia Time)", 8 },
29+ { "AWST (Australian Western Time)", 8 },
30+ { "ACST (Australian Eastern Time)", 9.5 },
31+ { "ACDT (Australian Daylight Eastern Time)", 10.5 },
32+ { "AEST (Australian Eastern Time)", 10 },
33+ { "AEDT (Australian Daylight Eastern Time)", 11 },
34+ { "NZST (New Zealand Time)", 12 },
35+ { "NZDT (New Zealand Daylight Time)", 13 },
36 { "GMT", 0 },
37 { "GMT+1", -1 },
38 { "GMT+2", -2 },
39@@ -144,13 +173,6 @@ struct {
40 { "GMT-12", 12 },
41 { "GMT-13", 13 },
42 { "GMT-14", 14 },
43- { "GMT-15", 15 },
44- { "WET", 0 },
45- { "CET", -1 },
46- { "AST", -4 },
47- { "CST", -6 },
48- { "MST", -7 },
49- { "PST", -8 },
50 { NULL, 0 }
51 };
52