HomeDevCentral

Print current unixtime

Description

Print current unixtime

Summary:
This command tweak was first implemented on UnderNet #win
in 2000s.

It's useful to write data in database or config files
when such timestamp format is used.

To avoid any confusion in variable names, the difference
between current and input timestamps is renamed delta_t.

Test Plan:
Check unixtime without parameter prints current timestamp.

Check an unixtime as parameter still works.

Check 0 behaves as a regular input, not as a falsy value.

21:09:16 < Dereckson> Gizmo: unixtime
21:09:16 < Gizmo> Dereckson: 1486674556
21:09:20 < Dereckson> Gizmo: unixtime 1486673868
21:09:20 < Gizmo> Dereckson: -11 minutes, -32 secs.
21:09:32 < Dereckson> Gizmo: unixtime 0
21:09:32 < Gizmo> Dereckson: -24777909 minutes, -32 secs.

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D914

Details

Provenance
derecksonAuthored on Feb 9 2017, 21:10
derecksonPushed on Feb 9 2017, 21:15
Reviewer
dereckson
Differential Revision
D914: Print current unixtime
Parents
rDARKBOT65c3e854f387: Prune unused functions prototypes
Branches
Unknown
Tags
Unknown
Tasks
T1151: Add unixtime command