Merge pull request #22573 from mrc0mmand/epoch-timestamp

time-util: introduce TIMESTAMP_UNIX
This commit is contained in:
Lennart Poettering
2022-02-21 16:13:47 +01:00
committed by GitHub
5 changed files with 26 additions and 5 deletions
+5
View File
@@ -325,6 +325,11 @@ TEST(format_timestamp) {
assert_se(parse_timestamp(buf, &y) >= 0);
assert_se(x / USEC_PER_SEC == y / USEC_PER_SEC);
assert_se(format_timestamp_style(buf, sizeof(buf), x, TIMESTAMP_UNIX));
log_debug("%s", buf);
assert_se(parse_timestamp(buf, &y) >= 0);
assert_se(x / USEC_PER_SEC == y / USEC_PER_SEC);
assert_se(format_timestamp_style(buf, sizeof(buf), x, TIMESTAMP_UTC));
log_debug("%s", buf);
assert_se(parse_timestamp(buf, &y) >= 0);