summaryrefslogtreecommitdiffstats
path: root/src/time-wait-sync
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-06-19 12:24:09 +0200
committerLuca Boccassi <luca.boccassi@microsoft.com>2020-08-19 16:30:13 +0200
commit7b3eb5c97ec835100b2974dae035004d07b6d60c (patch)
tree7c0330b87f962131cf05f934540092af73f74a34 /src/time-wait-sync
parenthomed: default to "btrfs" as fs type in the LUKS backend (diff)
downloadsystemd-7b3eb5c97ec835100b2974dae035004d07b6d60c.tar.xz
systemd-7b3eb5c97ec835100b2974dae035004d07b6d60c.zip
basic/time-util: add function to format timestamps with different styles
Instead of a multiple fixed format helper functions, add an enum and a single helper, so that it's easier to extend in the future.
Diffstat (limited to 'src/time-wait-sync')
-rw-r--r--src/time-wait-sync/time-wait-sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time-wait-sync/time-wait-sync.c b/src/time-wait-sync/time-wait-sync.c
index e880f9e6b6..96072445f6 100644
--- a/src/time-wait-sync/time-wait-sync.c
+++ b/src/time-wait-sync/time-wait-sync.c
@@ -155,7 +155,7 @@ static int clock_state_update(
if (tx.status & STA_NANO)
tx.time.tv_usec /= 1000;
t = timeval_load(&tx.time);
- ts = format_timestamp_us_utc(buf, sizeof(buf), t);
+ ts = format_timestamp_style(buf, sizeof(buf), t, TIMESTAMP_US_UTC);
if (!ts)
strcpy(buf, "unrepresentable");
log_info("adjtime state %d status %x time %s", sp->adjtime_state, tx.status, ts);