mirror of
https://github.com/fmtlib/fmt.git
synced 2025-06-25 01:11:40 +02:00
Remove deprecated localtime from docs
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user