diff --git a/Examples-and-Recipes.md b/Examples-and-Recipes.md index 64e5b91..5d26bae 100644 --- a/Examples-and-Recipes.md +++ b/Examples-and-Recipes.md @@ -756,7 +756,7 @@ std::tm to_calendar_time(std::chrono::time_point tp) } auto t = to_calendar_time(std::chrono::system_clock::now()); -std::cout << t.tm_year << "-" << t.tm_mon << "-" << t.tm_day << " "; +std::cout << t.tm_year + 1900 << "-" << t.tm_mon + 1 << "-" << t.tm_mday << " " << t.tm_hour << ":" << t.tm_min << ":" << t.tm_sec << "\n"; ```