Skip to content

Commit

Permalink
javascript months are 0 based.
Browse files Browse the repository at this point in the history
  • Loading branch information
craiggwilson committed Jul 22, 2010
1 parent 3a64923 commit 8e3705f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/MongoDB/Util/JsonFormatter.cs
Expand Up @@ -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);
Expand Down

0 comments on commit 8e3705f

Please sign in to comment.