| 331 | |
| 332 | |
| 333 | std::string formatTime(const char* format, double timestamp) { |
| 334 | time_t t = timestamp; |
| 335 | char str[1024]; |
| 336 | size_t s = std::strftime(str, sizeof(str), format, std::localtime(&t)); |
| 337 | return std::string(str, s); |
| 338 | } |
| 339 | |
| 340 | std::string formatTimeISO(double timestamp) { |
| 341 | // Windows doesn't support %F or %T, and %z gives the full timezone name instead of offset |