Permalink
Browse files

Fixed offset for monthStrings.

  • Loading branch information...
1 parent da1993f commit c309d934922cfe97c06585fbc0ad70c8e4f1d4fa @Aatch Aatch committed May 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/vibe/http/common.d
@@ -352,7 +352,7 @@ string toRFC822DateTimeString(SysTime time)
static immutable dayStrings = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
static immutable monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
formattedWrite(ret, "%s, %02d %s %d %02d:%02d:%02d %s", dayStrings[time.dayOfWeek],
- time.day, monthStrings[time.month], time.year, time.hour, time.minute, time.second, "GMT");
+ time.day, monthStrings[time.month-1], time.year, time.hour, time.minute, time.second, "GMT");
return ret.data;
}
@@ -371,7 +371,7 @@ string toRFC822DateString(SysTime time)
static immutable dayStrings = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
static immutable monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
formattedWrite(ret, "%s, %02d %s %d", dayStrings[time.dayOfWeek],
- time.day, monthStrings[time.month], time.year);
+ time.day, monthStrings[time.month-1], time.year);
return ret.data;
}

0 comments on commit c309d93

Please sign in to comment.