Page MenuHomeDevCentral

Print current unixtime
ClosedPublic

Authored by dereckson on Feb 9 2017, 21:13.
Tags
None
Referenced Files
F3786645: D914.id2320.diff
Tue, Nov 26, 16:38
F3786396: D914.diff
Tue, Nov 26, 14:47
Unknown Object (File)
Mon, Nov 11, 02:23
Unknown Object (File)
Sun, Nov 10, 05:41
Unknown Object (File)
Sun, Nov 10, 04:24
Unknown Object (File)
Sun, Nov 10, 02:55
Unknown Object (File)
Sun, Nov 10, 00:01
Unknown Object (File)
Sat, Nov 9, 15:44
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.