diff --git a/doc/api.rst b/doc/api.rst index 35f695c5..8da96d04 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -408,7 +408,7 @@ formatting:: std::time_t t = std::time(nullptr); // Prints "The date is 2016-04-29." (with the current date) - fmt::print("The date is {:%Y-%m-%d}.", *std::localtime(&t)); + fmt::print("The date is {:%Y-%m-%d}.", fmt::localtime(t)); The format string syntax is described in the documentation of `strftime `_.