How to get ISO8601 seconds format from "date" in busybox?

Viewed 2564

Without adequate examples I keep going around in circles to get the 'seconds' version of iso8601 printed out by 'date'. Please look at the help that is provided with date with busybox 1.22.1. I can't seem to understand the syntax required. Examples speaks louder than words in my experience and I haven't found anything that could be useful online.

Here is what I tried:

➤ date -I=seconds
➤ date -I SPEC='seconds'
➤ date -I seconds
➤ date -I='seconds'
➤ date -I 'seconds'
➤ date -I['seconds']
➤ date -I TIMESPEC='seconds'
➤ date -I TIMESPEC=seconds

Note I have tried to use the Ubuntu version of date and was able to figure out how to get the iso8601=seconds format of date, but not in busybox...

Here is what the help of date shows for Busybox 1.22.1:

BusyBox v1.22.1 (2014-09-26 07:33:17 CEST) multi-call binary.
Usage: date [OPTIONS] [+FMT] [TIME]
Display time (using +FMT), or set time
    [-s,--set] TIME Set time to TIME
    -u,--utc        Work in UTC (don't convert to local time)
    -R,--rfc-2822   Output RFC-2822 compliant date string
    -I[SPEC]        Output ISO-8601 compliant date string
                    SPEC='date' (default) for date only,
                    'hours', 'minutes', or 'seconds' for date and
                    time to the indicated precision
    -r,--reference FILE     Display last modification time of FILE
    -d,--date TIME  Display TIME, not 'now'
    -D FMT          Use FMT for -d TIME conversion
1 Answers
Related