|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71250 - in branches/release/libs/date_time: example/local_time test/posix_time
From: marshall_at_[hidden]
Date: 2011-04-14 11:58:01
Author: marshall
Date: 2011-04-14 11:58:01 EDT (Thu, 14 Apr 2011)
New Revision: 71250
URL: http://svn.boost.org/trac/boost/changeset/71250
Log:
Merge fixes to release; Fixes #5126
Properties modified:
branches/release/libs/date_time/example/local_time/local_date_time.cpp (contents, props changed)
branches/release/libs/date_time/test/posix_time/testtime_facet.cpp (contents, props changed)
branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp (contents, props changed)
Text files modified:
branches/release/libs/date_time/example/local_time/local_date_time.cpp | 2 +-
branches/release/libs/date_time/test/posix_time/testtime_facet.cpp | 18 +++++++++---------
branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp | 26 +++++++++++++-------------
3 files changed, 23 insertions(+), 23 deletions(-)
Modified: branches/release/libs/date_time/example/local_time/local_date_time.cpp
==============================================================================
--- branches/release/libs/date_time/example/local_time/local_date_time.cpp (original)
+++ branches/release/libs/date_time/example/local_time/local_date_time.cpp 2011-04-14 11:58:01 EDT (Thu, 14 Apr 2011)
@@ -24,7 +24,7 @@
local_date_time ny_time(date(2004, Aug, 30), hours(10), nyc, true);
typedef boost::date_time::time_facet<local_date_time, char> ldt_facet;
- ldt_facet* timefacet = new ldt_facet("%Y-%b-%d %H:%M:%S%F %Z");
+ ldt_facet* timefacet = new ldt_facet("%Y-%b-%d %H:%M:%S""%F %Z");
std::locale loc(std::locale::classic(), timefacet);
std::cout << ny_time << std::endl;
Modified: branches/release/libs/date_time/test/posix_time/testtime_facet.cpp
==============================================================================
--- branches/release/libs/date_time/test/posix_time/testtime_facet.cpp (original)
+++ branches/release/libs/date_time/test/posix_time/testtime_facet.cpp 2011-04-14 11:58:01 EDT (Thu, 14 Apr 2011)
@@ -165,7 +165,7 @@
//reset the sign to always print
time_facet* f = new time_facet();
ss.imbue(std::locale(ss.getloc(), f));
- f->time_duration_format("%+%H:%M:%S%F");
+ f->time_duration_format("%+%H:%M:%S""%F");
ss.str("");
ss << td4 - td3;
@@ -348,20 +348,20 @@
}
{
- wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S%F");
- teststreaming("widestream custom time no frac seconds %F operator: %Y-%b-%d %H:%M:%S%F", t,
+ wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S" L"%F");
+ teststreaming("widestream custom time no frac seconds %F operator: %Y-%b-%d %H:%M:%S""%F", t,
std::wstring(L"2004-Oct-13 18:01:56"),
std::locale(std::locale::classic(), wtimefacet));
}
{
- wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S%F");
+ wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S" L"%F");
#ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- teststreaming("widestream custom time with frac seconds %F operator: %Y-%b-%d %H:%M:%S%F", tf,
+ teststreaming("widestream custom time with frac seconds %F operator: %Y-%b-%d %H:%M:%S""%F", tf,
std::wstring(L"2004-Oct-13 18:01:56.000003000"),
std::locale(std::locale::classic(), wtimefacet));
#else
- teststreaming("widestream custom time with frac seconds %F operator: %Y-%b-%d %H:%M:%S%F", tf,
+ teststreaming("widestream custom time with frac seconds %F operator: %Y-%b-%d %H:%M:%S""%F", tf,
std::wstring(L"2004-Oct-13 18:01:56.000003"),
std::locale(std::locale::classic(), wtimefacet));
#endif // BOOST_DATE_TIME_HAS_NANOSECONDS
@@ -395,13 +395,13 @@
{
- wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S%F");
+ wtime_facet* wtimefacet = new wtime_facet(L"%Y-%b-%d %H:%M:%S" L"%F");
#ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- teststreaming("widestream time period frac seconds %F operator: %Y-%b-%d %H:%M:%S%F", tp,
+ teststreaming("widestream time period frac seconds %F operator: %Y-%b-%d %H:%M:%S""%F", tp,
std::wstring(L"[2004-Oct-13 18:01:56/2004-Oct-20 19:02:57.000002999]"),
std::locale(std::locale::classic(), wtimefacet));
#else
- teststreaming("widestream time period frac seconds %F operator: %Y-%b-%d %H:%M:%S%F", tp,
+ teststreaming("widestream time period frac seconds %F operator: %Y-%b-%d %H:%M:%S""%F", tp,
std::wstring(L"[2004-Oct-13 18:01:56/2004-Oct-20 19:02:57.000002]"),
std::locale(std::locale::classic(), wtimefacet));
#endif // BOOST_DATE_TIME_HAS_NANOSECONDS
Modified: branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp
==============================================================================
--- branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp (original)
+++ branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp 2011-04-14 11:58:01 EDT (Thu, 14 Apr 2011)
@@ -117,7 +117,7 @@
time_input_facet* facet = new time_input_facet();
std::locale loc(std::locale::classic(), facet);
- facet->time_duration_format("%H:%M:%S%f");
+ facet->time_duration_format("%H:%M:%S""%f");
iss.imbue(loc);
iss.str("14:13:12.0 extra stuff");
@@ -180,7 +180,7 @@
{ /****** iso format tests (and custom 'scrunched-together formats) ******/
time_input_facet *facet = new time_input_facet();
facet->set_iso_format();
- facet->time_duration_format("%H%M%S%F"); // iso format
+ facet->time_duration_format("%H""%M""%S""%F"); // iso format
std::stringstream ss;
ss.imbue(std::locale(std::locale::classic(), facet));
ptime pt(not_a_date_time);
@@ -217,19 +217,19 @@
ss.exceptions(std::ios_base::failbit); // we need exceptions turned on here
int count = 0;
try {
- facet->time_duration_format("%H%M%S%F");
+ facet->time_duration_format("%H""%M""%S""%F");
ss.str("not-a-date-time");
++count;
ss >> td;
check_equal("special value w/ hours flag", td, nadt);
ss.str("");
- facet->time_duration_format("%M%S%F");
+ facet->time_duration_format("%M""%S""%F");
ss.str("not-a-date-time");
++count;
ss >> td;
check_equal("special value w/ minutes flag", td, nadt);
ss.str("");
- facet->time_duration_format("%S%F");
+ facet->time_duration_format("%S""%F");
ss.str("not-a-date-time");
++count;
ss >> td;
@@ -257,17 +257,17 @@
// exception tests
std::ios_base::failure exc("failure");
check("failure test w/ hours flag",
- failure_test(td, "bad_input", exc, new time_input_facet("%H%M%S%F")));
+ failure_test(td, "bad_input", exc, new time_input_facet("%H""%M""%S""%F")));
check("silent failure test w/ hours flag",
- failure_test(td, "bad_input", new time_input_facet("%H%M%S%F")));
+ failure_test(td, "bad_input", new time_input_facet("%H""%M""%S""%F")));
check("failure test w/ minute flag",
- failure_test(td, "bad_input", exc, new time_input_facet("%M%S%F")));
+ failure_test(td, "bad_input", exc, new time_input_facet("%M""%S""%F")));
check("silent failure test w/ minute flag",
- failure_test(td, "bad_input", new time_input_facet("%M%S%F")));
+ failure_test(td, "bad_input", new time_input_facet("%M""%S""%F")));
check("failure test w/ second flag",
- failure_test(td, "bad_input", exc, new time_input_facet("%S%F")));
+ failure_test(td, "bad_input", exc, new time_input_facet("%S""%F")));
check("silent failure test w/ second flag",
- failure_test(td, "bad_input", new time_input_facet("%S%F")));
+ failure_test(td, "bad_input", new time_input_facet("%S""%F")));
check("failure test w/ sec w/frac (always) flag",
failure_test(td, "bad_input", exc, new time_input_facet("%s")));
check("silent failure test w/ sec w/frac (always) flag",
@@ -350,11 +350,11 @@
// Failure tests
// faliure tests for date elements tested in gregorian tests
time_input_facet* facet2 = new time_input_facet();
- facet2->time_duration_format("%H:%M:%S%f");
+ facet2->time_duration_format("%H:%M:%S""%f");
check("Failure test: Missing frac_sec with %f flag (w/exceptions)",
failure_test(td, "14:13:12 extra stuff", e_failure, facet2));
time_input_facet* facet3 = new time_input_facet();
- facet3->time_duration_format("%H:%M:%S%f");
+ facet3->time_duration_format("%H:%M:%S""%f");
check("Failure test: Missing frac_sec with %f flag (no exceptions)",
failure_test(td, "14:13:12 extra stuff", facet3));
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk