问题描述
coliru link 自己查看和编译代码。
var ticketList = ctx.Tickets
.sqlQuery("Select * from Tickets where Id=1")
.ToList<Ticket>();
#include <chrono>
#include <filesystem>
#include <iostream>
int main()
{
std::cout << "Now: "
<< std::filesystem::file_time_type::clock().Now().time_since_epoch().count()
<< "\n";
return 0;
}
解决方法
libstdc++ 的 std::filesystem::file_time_type::clock()
的纪元似乎是 2174-01-01 00:00:00 UTC,因此当前日期的负计数并不意外。