dout(0) << "NOTICE: bad date (predates epoch): " << req_date << dendl;
return false;
}
- *header_time = utime_t(timegm(&t), 0);
+ *header_time = utime_t(internal_timegm(&t), 0);
}
}
return -EINVAL;
}
- time_t sec = timegm(&tm);
+ time_t sec = internal_timegm(&tm);
*time = utime_t(sec, ns).to_real_time();
return 0;
uint32_t nsec;
if (parse_iso8601(mtime_str.c_str(), &t, &nsec)) {
ceph_timespec ts;
- ts.tv_sec = (uint64_t)timegm(&t);
+ ts.tv_sec = (uint64_t)internal_timegm(&t);
ts.tv_nsec = nsec;
mtime = real_clock::from_ceph_timespec(ts);
}
JSONDecoder::decode_json("expires", expires_iso8601, obj, true);
if (parse_iso8601(expires_iso8601.c_str(), &t)) {
- expires = timegm(&t);
+ expires = internal_timegm(&t);
} else {
expires = 0;
throw JSONDecoder::err("Failed to parse ISO8601 expiration date from Keystone response.");
struct tm t;
if (parse_iso8601(expires_iso8601.c_str(), &t)) {
- token.expires = timegm(&t);
+ token.expires = internal_timegm(&t);
} else {
token.expires = 0;
throw JSONDecoder::err("Failed to parse ISO8601 expiration date"
if (!parse_iso8601(e.c_str(), &t))
return -EINVAL;
- expires = timegm(&t);
+ expires = internal_timegm(&t);
return 0;
}
return -EPERM;
}
/* handle expiration in epoch time */
- now_req = (uint64_t)timegm(&date_t);
+ now_req = (uint64_t)internal_timegm(&date_t);
if (now >= now_req + exp) {
dout(10) << "NOTICE: now = " << now << ", now_req = " << now_req << ", exp = " << exp << dendl;
return -EPERM;