| 846 | } |
| 847 | |
| 848 | void |
| 849 | test_Z() |
| 850 | { |
| 851 | using namespace date; |
| 852 | using namespace std::chrono; |
| 853 | using date::local_seconds, date::local_days; |
| 854 | { |
| 855 | std::string a; |
| 856 | std::istringstream in{"2016-12-26 15:53:22 word"}; |
| 857 | local_seconds tp; |
| 858 | in >> parse("%F %T %Z", tp, a); |
| 859 | assert(!in.fail()); |
| 860 | assert(!in.bad()); |
| 861 | assert(tp == local_days{2016_y/12/26} + hours{15} + minutes{53} + seconds{22}); |
| 862 | assert(a == "word"); |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | void |
| 867 | test_trailing_Z() |