Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/main/java/net/adamcin/httpsig/api/RequestContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public Builder addHeader(final String name, final String value) {
*/
public Builder addDate(Calendar calendar) {
if (calendar != null) {
DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_RFC1123);
DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_RFC1123, Locale.US);
dateFormat.setTimeZone(calendar.getTimeZone());
this.addHeader(Constants.HEADER_DATE, dateFormat.format(calendar.getTime()));
}
Expand Down Expand Up @@ -336,7 +336,7 @@ protected static Date tryParseDate(String date) {

for (String formatString : SUPPORTED_DATE_FORMATS) {
try {
DateFormat dateFormat = new SimpleDateFormat(formatString);
DateFormat dateFormat = new SimpleDateFormat(formatString, Locale.US);
dateFormat.setTimeZone(getGMT());
return dateFormat.parse(date);
} catch (ParseException e) {
Expand Down