diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2011-11-20 13:17:04 -0800 |
---|---|---|
committer | Yehuda Sadeh <yehuda@hq.newdream.net> | 2011-11-20 13:18:26 -0800 |
commit | 3b53b722b34b5284e6b8a5571a08d4b7ec276241 (patch) | |
tree | a7587c7910f8a438929887d9d9b479a177554909 | |
parent | 9920a168c59807083019c62fdf381434edea12e5 (diff) | |
download | ceph-3b53b722b34b5284e6b8a5571a08d4b7ec276241.tar.gz |
rgw: support alternative date formatting
being used by s3cmd
-rw-r--r-- | src/rgw/rgw_common.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index e024d0dc045..851abdc9a8d 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -157,9 +157,14 @@ static bool parse_rfc1123(const char *s, struct tm *t) return check_str_end(strptime(s, "%a, %d %b %Y %H:%M:%S GMT", t)); } +static bool parse_rfc1123_alt(const char *s, struct tm *t) +{ + return check_str_end(strptime(s, "%a, %d %b %Y %H:%M:%S %z", t)); +} + bool parse_rfc2616(const char *s, struct tm *t) { - return parse_rfc850(s, t) || parse_asctime(s, t) || parse_rfc1123(s, t); + return parse_rfc850(s, t) || parse_asctime(s, t) || parse_rfc1123(s, t) || parse_rfc1123_alt(s,t); } int parse_time(const char *time_str, time_t *time) |