DataReelDataReelC++ Toolkit Documentation

Time Stamp Functions

Thread-safe time stamp functions in systime.h. They replace the 6.x SysTime class.

Contents

Overview
Functions

Overview

Use std::chrono for time arithmetic; these functions format the current time for logs and protocols.

Functions

std::tm local_tm(std::time_t t) / utc_tm(std::time_t t)

Thread-safe localtime() and gmtime().

std::string time_string(const char *fmt, bool utc = false)

Formats the current time with strftime() codes. Another overload takes a time_t.

std::string date_time_string(bool full_month_name = false)

Oct 26, 2026 14:05:09 (used by LogFile).

std::string syslog_time()

Oct 26 14:05:09

std::string smtp_time()

Mon, 26 Oct 2026 14:05:09 -0500 (RFC 5322)

std::string http_time()

Mon, 26 Oct 2026 19:05:09 GMT (RFC 9110)

std::string iso8601_utc()

2026-10-26T19:05:09Z