mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 16:37:13 +01:00
SF# 3288584 in trunk
This commit is contained in:
parent
c4ad405d9d
commit
d3365b3df3
@ -16,14 +16,14 @@
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
@ -43,6 +43,11 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
void DateTimeFormatter::append(std::string& str, const LocalDateTime& dateTime, const std::string& fmt)
|
||||
{
|
||||
DateTimeFormatter::append(str, dateTime.utc(), fmt, dateTime.tzd());
|
||||
}
|
||||
|
||||
void DateTimeFormatter::append(std::string& str, const DateTime& dateTime, const std::string& fmt, int timeZoneDifferential)
|
||||
{
|
||||
std::string::const_iterator it = fmt.begin();
|
||||
@ -158,7 +163,7 @@ void DateTimeFormatter::tzdRFC(std::string& str, int timeZoneDifferential)
|
||||
str += '-';
|
||||
NumberFormatter::append0(str, -timeZoneDifferential/3600, 2);
|
||||
NumberFormatter::append0(str, (-timeZoneDifferential%3600)/60, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else str += "GMT";
|
||||
}
|
||||
|
@ -47,6 +47,10 @@ using Poco::DateTimeFormatter;
|
||||
|
||||
DateTimeFormatterTest::DateTimeFormatterTest(const std::string& name): CppUnit::TestCase(name)
|
||||
{
|
||||
// Linker regresion SF #3288584
|
||||
std::string message;
|
||||
Poco::LocalDateTime now;
|
||||
Poco::DateTimeFormatter::append(message,now,"%H:%M:%S.%i");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user