diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-02-13 17:20:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-13 17:20:29 -0800 |
| commit | 50a545fcff4b3c922aa3ef5d0646dc9850f1bb86 (patch) | |
| tree | 7bcf3d97be5a4ed4bc6bd008c9c262e51f1b792b | |
| parent | d1e8095d634aa010a2974f23a90cca3ddc2f7fb5 (diff) | |
| parent | 32d62b2bfd93dddbfe08bee420abfcbcdd1134af (diff) | |
| download | vcpkg-50a545fcff4b3c922aa3ef5d0646dc9850f1bb86.tar.gz vcpkg-50a545fcff4b3c922aa3ef5d0646dc9850f1bb86.zip | |
Merge pull request #2780 from Alisayyy-Yang/NewFixDateBranch
Fix date issue
| -rw-r--r-- | ports/date/fix-date.patch | 36 | ||||
| -rw-r--r-- | ports/date/portfile.cmake | 5 |
2 files changed, 41 insertions, 0 deletions
diff --git a/ports/date/fix-date.patch b/ports/date/fix-date.patch new file mode 100644 index 000000000..bf4c05b38 --- /dev/null +++ b/ports/date/fix-date.patch @@ -0,0 +1,36 @@ +diff --git a/include/date/tz.h b/include/date/tz.h +index 280a598..f9b5a35 100644 +--- a/include/date/tz.h ++++ b/include/date/tz.h +@@ -1963,7 +1963,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + bool is_60_sec = fds.tod.seconds() == seconds{60}; + if (is_60_sec) + fds.tod.seconds() -= seconds{1}; +- auto tmp = to_utc_time(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); ++ auto tmp = utc_clock::from_sys(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); + if (is_60_sec) + tmp += seconds{1}; + if (is_60_sec != is_leap_second(tmp).first || !fds.tod.in_conventional_range()) +@@ -2197,7 +2197,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + return is; + } + +-#if !defined(_MSC_VER) || _MSC_VER > 1912 ++#if !defined(_MSC_VER) || _MSC_VER > 1913 + + // clock_time_conversion + +@@ -2471,7 +2471,7 @@ clock_cast(const std::chrono::time_point<SrcClock, Duration>& tp) + return clock_cast_detail::cc_impl<DstClock>(tp, &tp); + } + +-#endif // !defined(_MSC_VER) || _MSC_VER > 1912 ++#endif // !defined(_MSC_VER) || _MSC_VER > 1913 + + // Deprecated API + +@@ -2579,3 +2579,4 @@ to_gps_time(const tai_time<Duration>& t) + } // namespace date + + #endif // TZ_H ++ diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index e060edb87..c60a7bcb0 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -13,6 +13,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-date.patch +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( |
