win32 needs strange strftime args
authorMeir Yanovich <meiry@github.invalid.com>
Tue, 5 Apr 2016 11:51:25 +0000 (19:51 +0800)
committerAndy Green <andy@warmcat.com>
Tue, 5 Apr 2016 11:51:25 +0000 (19:51 +0800)
test-server/test-server-status.c

index 5fb599a..d85897b 100644 (file)
@@ -57,7 +57,11 @@ update_status(struct lws *wsi, struct per_session_data__lws_status *pss)
 #endif
                        strcpy(date, "unknown");
                else
+#ifdef WIN32
+                       strftime(date, sizeof(date), "%Y %H:%M %Z", ptm);
+#else
                        strftime(date, sizeof(date), "%F %H:%M %Z", ptm);
+#endif
                if ((p - start) > (sizeof(cache) - 512))
                        break;
                if (subsequent)