Better formatting.

This commit is contained in:
karlr42
2014-03-06 15:23:02 +00:00
parent e060f109fd
commit 7e2faf3bdf

View File

@@ -119,7 +119,7 @@ HTTPCookie::HTTPCookie(const NameValueCollection& nvc):
int tzd; int tzd;
DateTime exp = DateTimeParser::parse(value, tzd); DateTime exp = DateTimeParser::parse(value, tzd);
Timestamp now; Timestamp now;
setMaxAge((int) ((exp.timestamp() - now)/Timestamp::resolution())); setMaxAge((int) ((exp.timestamp() - now) / Timestamp::resolution()));
} }
else if (icompare(name, "version") == 0) else if (icompare(name, "version") == 0)
{ {
@@ -275,7 +275,7 @@ std::string HTTPCookie::toString() const
if (_maxAge != -1) if (_maxAge != -1)
{ {
Timestamp ts; Timestamp ts;
ts += _maxAge*Timestamp::resolution(); ts += _maxAge * Timestamp::resolution();
result.append("; expires="); result.append("; expires=");
DateTimeFormatter::append(result, ts, DateTimeFormat::HTTP_FORMAT); DateTimeFormatter::append(result, ts, DateTimeFormat::HTTP_FORMAT);
} }