mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-05-02 23:59:21 -05:00
More fixes to sampling output format (#390)
This commit is contained in:
committed by
GitHub Enterprise
parent
25d904b2d1
commit
f3d77f9c86
+5
-5
@@ -89,12 +89,12 @@ std::ostream& operator<<(std::ostream& out, EggsTime eggst) {
|
||||
if (gmtime_r(&secs, &tm) == nullptr) {
|
||||
throw SYSCALL_EXCEPTION("gmtime_r");
|
||||
}
|
||||
// "2006-01-02T15:04:05.999999999Z07:00"
|
||||
char buf[36];
|
||||
ALWAYS_ASSERT(strftime(buf, 29, "%Y-%m-%dT%H:%M:%S.", &tm) == 20);
|
||||
// "2006-01-02T15:04:05.999999999Z"
|
||||
char buf[31];
|
||||
ALWAYS_ASSERT(strftime(buf, 21, "%Y-%m-%dT%H:%M:%S.", &tm) == 20);
|
||||
ALWAYS_ASSERT(snprintf(buf + 20, 10, "%09lu", nsecs) == 9);
|
||||
ALWAYS_ASSERT(snprintf(buf + 29, 7, "Z00:00") == 6);
|
||||
buf[35] = '\0';
|
||||
ALWAYS_ASSERT(snprintf(buf + 29, 2, "Z") == 1);
|
||||
buf[30] = '\0';
|
||||
out << buf;
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user