Commit fa5d903e authored by jan.koester's avatar jan.koester
Browse files

test

parent e8860862
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
 *******************************************************************************/

#include <chrono>
#include <cstdio>
#if defined(FreeBSD) || defined(__APPLE__)
#include <date/date.h>
#include <date/tz.h>
@@ -104,6 +105,16 @@ namespace blogi {
		date::year_month_day cdate;
                std::stringstream ss(res[i][1]);
                date::from_stream(ss, "%Y-%m-%d", cdate);
#elif defined(_LIBCPP_VERSION)
                int y, m, d;
                if (std::sscanf(res[i][1], "%d-%d-%d", &y, &m, &d) == 3) {
                    std::chrono::year_month_day cdate{std::chrono::year{y}, std::chrono::month{static_cast<unsigned>(m)}, std::chrono::day{static_cast<unsigned>(d)}};
                    sitemap.emplace(
                        Args->config->getsiteurl() + "/content/read/" + res[i][0],
                        cdate
                    );
                }
                continue;
#else
                std::chrono::year_month_day cdate;
                std::stringstream ss(res[i][1]);
@@ -816,7 +827,7 @@ namespace blogi {
                    auto now = std::chrono::system_clock::now();
#if defined(FreeBSD) || defined(__APPLE__)
                    auto local_now = date::zoned_time{date::current_zone(), now};
#else
#elif !defined(_LIBCPP_VERSION)
                    auto local_now = std::chrono::zoned_time{std::chrono::current_zone(), now};
#endif
                    try {