Featured image of post Comment afficher l'heure actuelle au format ISO 8601 en C++

Comment afficher l'heure actuelle au format ISO 8601 en C++

Prérequis

  • Norme ISO C++ 20 (/std:c++20)

Code

1
2
3
4
#include <chrono>
#include <format>

std::string datetime = std::format("{:%FT%TZ}", system_clock::now());

Voici comment afficher l’heure actuelle au format ISO 8601 en C++.

Références

comments powered by Disqus
Généré avec Hugo
Thème Stack conçu par Jimmy