Page MenuHomeDevCentral

Print current unixtime
ClosedPublic

Authored by dereckson on Feb 9 2017, 21:13.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 8, 18:09
Unknown Object (File)
Thu, Jan 2, 11:29
Unknown Object (File)
Mon, Dec 30, 02:23
Unknown Object (File)
Mon, Dec 30, 02:23
Unknown Object (File)
Mon, Dec 30, 02:08
Unknown Object (File)
Mon, Dec 30, 01:56
Unknown Object (File)
Fri, Dec 27, 13:30
Unknown Object (File)
Sun, Dec 15, 06:35
Subscribers
None

Details

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.

Diff Detail

Repository
rDARKBOT Darkbot
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
unixtime (branched from master)
Build Status
Buildable 1409
Build 1657: arc lint + arc unit

Event Timeline

dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 9 2017, 21:14
This revision was automatically updated to reflect the committed changes.