diff src/c/urweb.c @ 2217:98b87d905601

Merge.
author Ziv Scully <ziv@mit.edu>
date Mon, 10 Nov 2014 22:07:51 -0500
parents ef766ef6e242 d77b0665ba7c
children 794017f378de
line wrap: on
line diff
--- a/src/c/urweb.c	Mon Nov 10 22:04:40 2014 -0500
+++ b/src/c/urweb.c	Mon Nov 10 22:07:51 2014 -0500
@@ -2910,13 +2910,17 @@
     }
   }
   else {
-    if (strptime(s, TIME_FMT_PG, &stm) == end) {
+    if (strptime(s, ctx->app->time_format, &stm) == end) {
       uw_Basis_time *r = uw_malloc(ctx, sizeof(uw_Basis_time));
       r->seconds = mktime(&stm);
       r->microseconds = 0;
       return r;
-    }
-    else if (strptime(s, TIME_FMT, &stm) == end) {
+    } else if (strptime(s, TIME_FMT_PG, &stm) == end) {
+      uw_Basis_time *r = uw_malloc(ctx, sizeof(uw_Basis_time));
+      r->seconds = mktime(&stm);
+      r->microseconds = 0;
+      return r;
+    } else if (strptime(s, TIME_FMT, &stm) == end) {
       uw_Basis_time *r = uw_malloc(ctx, sizeof(uw_Basis_time));
       r->seconds = mktime(&stm);
       r->microseconds = 0;
@@ -3060,7 +3064,10 @@
     }
   }
   else {
-    if (strptime(s, TIME_FMT_PG, &stm) == end) {
+    if (strptime(s, ctx->app->time_format, &stm) == end) {
+      uw_Basis_time r = { mktime(&stm) };
+      return r;
+    } else if (strptime(s, TIME_FMT_PG, &stm) == end) {
       uw_Basis_time r = { mktime(&stm) };
       return r;
     } else if (strptime(s, TIME_FMT, &stm) == end) {