Преглед изворни кода

Don't try (and fail) to parse non-UTC dates in posts.

I'll provide a real fix eventually.
grunfink пре 2 дана
родитељ
комит
3391e38d94
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      html.c

+ 1 - 1
html.c

@@ -216,7 +216,7 @@ xs_str *html_date_label(snac *user, const char *date)
 
 
     /* check if a user has actually set a timezone */
     /* check if a user has actually set a timezone */
     if (user != NULL && xs_dict_get(user->config, "tz") != NULL &&
     if (user != NULL && xs_dict_get(user->config, "tz") != NULL &&
-        (t = xs_parse_iso_date(date, 0)) != 0) {
+        xs_endswith(date, "Z") && (t = xs_parse_iso_date(date, 0)) != 0) {
         t += xs_tz_offset(user->tz);
         t += xs_tz_offset(user->tz);
 
 
         time_t today = time(NULL);
         time_t today = time(NULL);