sg_timestamp --version (return code: 0)
version: 1.02 20160126
sg_timestamp --help (return code: 0)
Usage: sg_timestamp [--help] [--milliseconds=MS] [--origin] [--raw]
[--readonly] [--seconds=SEC] [--srep] [--verbose]
[--version] DEVICE
where:
--help|-h print out usage message
--milliseconds=MS|-m MS set timestamp to MS milliseconds since
1970-01-01 00:00:00 UTC
--origin|-o show Report timestamp origin (def: don't)
--raw|-r output Report timestamp response to stdout in
binary
--readonly|-R open DEVICE read only (def: read/write)
--seconds=SEC|-s SEC set timestamp to SEC seconds since
1970-01-01 00:00:00 UTC
--srep|-S output Report timestamp in seconds (def:
milliseconds)
--verbose|-v increase verbosity
--version|-V print version string and exit
Performs a SCSI REPORT TIMESTAMP or SET TIMESTAMP command. The timestamp
is SET if either the --milliseconds=MS or --seconds=SEC option is given,
otherwise the existing timestamp is reported. The DEVICE stores the
timestamp as the number of milliseconds since power up (or reset) or
since 1970-01-01 00:00:00 UTC which also happens to be the time 'epoch'
of Unix machines. The 'date +%s' command in Unix returns the number of
seconds since the epoch. To convert a reported timestamp (in seconds since
the epoch) to a more readable form use 'date --date='@<secs_since_epoch>' .