Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

javascript months are 0 based.

  • Loading branch information...
commit 8e3705fd76ad4b9bf2a577b913f435f9089fd1b9 1 parent 3a64923
@craiggwilson craiggwilson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  source/MongoDB/Util/JsonFormatter.cs
View
2  source/MongoDB/Util/JsonFormatter.cs
@@ -44,7 +44,7 @@ public static string SerializeForServerSide(object value)
if (value is DateTime)
{
DateTime d = (DateTime)value;
- sb.AppendFormat("new Date({0},{1},{2},{3},{4},{5},{6})", d.Year, d.Month, d.Day, d.Hour, d.Minute, d.Second, d.Millisecond);
+ sb.AppendFormat("new Date({0},{1},{2},{3},{4},{5},{6})", d.Year, d.Month - 1, d.Day, d.Hour, d.Minute, d.Second, d.Millisecond);
}
else
SerializeType(value, sb);
Please sign in to comment.
Something went wrong with that request. Please try again.