Skip to content

Commit

Permalink
update Android Cookie Expiration date format to 24-hour format (HH)
Browse files Browse the repository at this point in the history
- changed SimpleDateFormat patter from 'hh'(12-hour) to 'HH'(24-hour)
  • Loading branch information
takuyaaaaaaahaaaaaa authored Oct 31, 2024
1 parent fa1ee68 commit 66a1f84
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public List<Map<String, Object>> getCookies(final String url) {

if (cookieParamName.equalsIgnoreCase("Expires")) {
try {
final SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss z", Locale.US);
final SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
Date expiryDate = sdf.parse(cookieParamValue);
if (expiryDate != null) {
cookieMap.put("expiresDate", expiryDate.getTime());
Expand Down

0 comments on commit 66a1f84

Please sign in to comment.