time-util: support parsing OUTPUT_SHORT and OUTPUT_SHORT_PRECISE timestamps
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 12 Mar 2022 11:17:46 +0000 (12:17 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 12 Mar 2022 17:18:08 +0000 (17:18 +0000)
commit34c4dff4d2e592e90dd9833fee4ce1ac981e8ea9
treee6012ee6f96e2ae58b2fe60a24e660bc43cd2ad7
parent1627f158fce1f2c46ea64808e2b3a46f53d8ebb6
time-util: support parsing OUTPUT_SHORT and OUTPUT_SHORT_PRECISE timestamps

so we can feed journalctl the localized syslog-style timestamps it shows
by default, e.g.:

```
$ LANG=cs_CZ.utf-8 build-san/journalctl -b --no-hostname | head -n1
led 30 22:13:54 systemd-journald[981]: System Journal (/var/log/journal/1588e1d9d0b74acdbaada907b163b837) is 4.1G, max 4.0G, 0B free.
$ LANG=cs_CZ.utf-8 build-san/journalctl --no-hostname --since 'led 30 22:13:54' -n1
led 30 22:13:54 systemd-journald[981]: System Journal (/var/log/journal/1588e1d9d0b74acdbaada907b163b837) is 4.1G, max 4.0G, 0B free.
$ LANG=cs_CZ.utf-8 build-san/journalctl --no-hostname --since 'led 30 22:13:54.9999' -n1
led 30 22:13:58 rsyslogd[1300]: imjournal: journal files changed, reloading...  [v8.2102.0-4.fc35 try https://www.rsyslog.com/e/0 ]
```

Resolves: #15899
src/basic/time-util.c
src/test/test-date.c