1#ifndef MODULEIO_PROVENANCE_HEADER_H
2#define MODULEIO_PROVENANCE_HEADER_H
18 const std::time_t now = std::time(
nullptr);
20 localtime_r(&now, &tm_local);
22 std::strftime(time_buf,
sizeof(time_buf),
"%Y-%m-%d %H:%M:%S", &tm_local);
23 return std::string(time_buf);
38inline std::string
prov_step(
const int istep_one_based,
const std::string& time_stamp)
40 return FmtCore::format(
"# ABACUS version: %s\n# Written at %s\n# Ionic_Step %d\n",
static std::string format(const char *fmt, const Ts &... args)
static function to format data
Definition formatter.h:41
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
std::string local_timestamp()
Definition provenance_header.h:16
std::string prov_step(const int istep_one_based, const std::string &time_stamp)
Two provenance lines followed by the unified "# Ionic_Step N" marker.
Definition provenance_header.h:38
std::string provenance_header(const std::string &time_stamp)
Definition provenance_header.h:30
std::string prov_inline(const std::string &time_stamp)
Definition provenance_header.h:48
#define VERSION
Definition version.h:2