tai64nlocal 1 user commands djbwares
tai64nlocal converts precise TAI64N timestamps to a human-readable format.
`tai64nlocal`

## Description

`tai64nlocal` reads lines from stdin. If a line does not begin with `@`, `tai64nlocal` writes it to stdout without change. If a line begins with `@`, `tai64nlocal` looks for a timestamp after the `@`, in the format printed by tai64n 1, and writes the line to stdout with the timestamp converted to local time in ISO format: YYYY-MM-DD HH:MM:SS.SSSSSSSSS.

For example, in the US/Pacific time zone, the input line

    @4000000037c219bf2ef02e94 mark

should be printed as

    1999-08-23 21:03:43.787492500 mark

Beware, however, that the current implementation of `tai64nlocal` relies on the UNIX localtime 3 library routine to find the local time. Some `localtime()` implementations use a broken time scale that does not account for leap seconds. On systems that use the Olson tz library (with an up-to-date leap-second table), you can fix this problem by setting your time zone to, e.g, `right/US/Pacific` instead of `US/Pacific`.

Beware also that most `localtime()` implementations are not Y2038-compliant.

`tai64nlocal` does not allocate any memory after it starts, except possibly inside `localtime()`.

## Exit codes

`tai64nlocal` exits 0 when it sees end of input. It exits 111 without an error message if it has trouble reading stdin or writing stdout.

## See also

supervise 1
svc 1
svok 1
svstat 1
svscanboot 1
svscan 1
readproctitle 1
fghack 1
pgrphack 1
multilog 1
tai64n 1
setuidgid 1
envuidgid 1
envdir 1
softlimit 1
setlock 1

## Author

Original code and documentation by Daniel J. Bernstein. Converted to manual pages and updated by Gerrit Pape in 2000, 2001, and 2002. Converted to DocBook XML by Jonathan de Boyne Pollard.