mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 00:49:46 +02:00
Better formatting.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user