Bug #3452
closedrgw: Handling of dates in If-UnModified-Since / Last-Modified seems to have issues with timezones
0%
Description
So:
- I query an object and I get a header back saying "Last-Modified: Fri, 31 Aug 2012 11:12:49 GMT"
- I reissue the query with a "If-Unmodified-Since: Fri, 31 Aug 2012 11:12:49 GMT"
and in the rgw logs you find :
2012-11-07 16:49:58.275680 7f78f57ba700 10 If-UnModified-Since: 1346411569 Last-Modified: 1346407969
as you can see there is excatly 3600 seconds between them and I'm in a GMT+1 zone ... so something somewhere is wrong.
AFAICT, the 1346407969 is the right epoch, matching the string "Fri, 31 Aug 2012 11:12:49 GMT".
1346411569 is returned by parse_time when fed with this string and seems wrong but I'm not sure exactly why ...
BTW, when analyzing that codepath, I came across a use of gmtime instead of gmtime_r, patch attached. It doesn't solve the issue though.
Files