This commit is contained in:
SoftFever
2026-01-23 17:05:56 +08:00
parent 12f51f906e
commit 9703a6b4d7
60 changed files with 13396 additions and 1785 deletions

View File

@@ -63,6 +63,15 @@ inline time_t parse_iso_utc_timestamp(const std::string &str)
return str2time(str, TimeZone::utc, TimeFormat::iso8601Z);
}
// /////////////////////////////////////////////////////////////////////////////
// Millisecond timestamps for cloud sync protocol
// Format: "2025-11-28T14:30:00.123Z" (ISO 8601 with milliseconds)
// Lossless conversion: Unix milliseconds <-> ISO 8601
// Format: "YYYY-MM-DDTHH:MM:SS.sssZ" (always 3 decimal places for milliseconds)
std::string millis_to_iso8601(long long unix_millis);
long long iso8601_to_millis(const std::string& iso_time); // Returns -1 on parse error
// /////////////////////////////////////////////////////////////////////////////
} // namespace Utils