blob: afc6ac7c8b526e8700ff5042faf04cb6b9a656f5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
.Dd September 7 2025
.Dt TIKTOK 1
.Os
.Sh NAME
.Nm tiktok
.Nd synchronized cli clock
.Sh SYNOPSIS
.Nm
.Op Fl i Ar interval
.Op Ar format
.Nm
.Fl h
.Sh DESCRIPTION
The
.Nm
utility is a CLI clock.
It prints the date and time customizable via
.Ar FORMAT
to the standard output at each
.Ar INTERVAL .
.Nm
is a synchronizing clock, meaning that it syncs to each interval.
If the interval is set to minutes,
this means that even if the clock is started at 16:29:45 the time will be
printed again 15 seconds later at 16:30:00.
This makes is especially well-suited for usage in status bars and other
places where you may want an accurate clock.
.Pp
The
.Ar FORMAT
argument follows the same syntax as the
.Xr strftime 3
C-function,
and details on the syntax should be looked up in the afformentioned
manual page.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl h , Fl Fl help
Display help information by opening this manual page.
.It Fl i Ar char , Fl Fl interval Ns = Ns Ar char
Set the clock interval.
The following intervals are supported:
.Bl -tag -compact
.It s
seconds
.It m
minutes
.It h
hours
.El
.Pp
When omitted the default interval is seconds.
.El
.Sh EXIT STATUS
.Ex -std
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev TZ
The timezone to display the date and time of.
.El
.Sh EXAMPLES
Get the date and time every second:
.Pp
.Dl $ tiktok '%F %T'
.Pp
Get the time (hours and minutes) and timezone in Stockholm, Sweden,
updating every minute:
.Pp
.Dl $ TZ=Europe/Stockholm tiktok --interval=m '%H:%M %Z'
.Sh SEE ALSO
.Xr cal 1 ,
.Xr date 1 ,
.Xr strftime 3
.Sh AUTHORS
.An Thomas Voss Aq Mt mail@thomasvoss.com
|