Permalink
Browse files

Merge branch 'dst-cookie-crash-73'

  • Loading branch information...
2 parents b7f3693 + af9fa1b commit 938d5c8190606ad7e905df68e2de1555a7e8d33d @emad emad committed Mar 9, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/mochiweb_cookies.erl
@@ -122,6 +122,13 @@ quote(V0) ->
rfc2109_cookie_expires_date(LocalTime) ->
{{YYYY,MM,DD},{Hour,Min,Sec}} =
case calendar:local_time_to_universal_time_dst(LocalTime) of
+ [] ->
+ {Date, {Hour1, Min1, Sec1}} = LocalTime,
+ LocalTime2 = {Date, {Hour1 + 1, Min1, Sec1}},
+ case calendar:local_time_to_universal_time_dst(LocalTime2) of
+ [Gmt] -> Gmt;
+ [_,Gmt] -> Gmt
+ end;
[Gmt] -> Gmt;
[_,Gmt] -> Gmt
end,

0 comments on commit 938d5c8

Please sign in to comment.