@laanwj Best I can tell from google and reading the c spec, it’s not guaranteed to be based on the UNIX epoch either :(. Of course, I’ve never seen an implementation that isn’t, as that would likely break years worth of assumptions. And based on that, I would assume that c++ implementations will be using the underlying c implementation.
So my logic was: if we can run a quick sanity check here to be sure that c/c++/unix epoch are all aligned, then we can use c apis and std::chrono interchangeably throughout the codebase without worry.
As for why chrono here, it was to avoid gettimeofday portability issues. If you’d prefer to work around those instead, no problem.
You’re right though that DateTimeStrFormat is kinda clunky. I only used c++ there to avoid c string size guessing. I’m also happy to switch that if you’d prefer.