summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/time.c b/time.c
index a6d9df73b9..b111bca647 100644
--- a/time.c
+++ b/time.c
@@ -1367,6 +1367,10 @@ time_asctime(VALUE time)
}
s = ASCTIME(&tobj->tm, buf);
if (s[24] == '\n') s[24] = '\0';
+#if (defined(_MSC_VER) && defined(_DLL)) || defined(__MSVCRT__)
+ /* workaround for MSVCRT's bug */
+ if (s[8] == '0') s[8] = ' ';
+#endif
return rb_str_new2(s);
}