Remove deprecated localtime from docs

This commit is contained in:
Victor Zverovich
2025-04-25 10:22:07 -07:00
parent 2d0518b5f7
commit 9f6c12c3dc

View File

@ -473,9 +473,9 @@ chrono-format-specifications).
#include <fmt/chrono.h>
int main() {
std::time_t t = std::time(nullptr);
auto now = std::chrono::system_clock::now();
fmt::print("The date is {:%Y-%m-%d}.", fmt::localtime(t));
fmt::print("The date is {:%Y-%m-%d}.\n", now);
// Output: The date is 2020-11-07.
// (with 2020-11-07 replaced by the current date)
@ -488,8 +488,6 @@ chrono-format-specifications).
// Output: strftime-like format: 03:15:30
}
::: localtime(std::time_t)
::: gmtime(std::time_t)
<a id="std-api"></a>