Page MenuHomeDevCentral

Print current unixtime
ClosedPublic

Authored by dereckson on Feb 9 2017, 21:13.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 08:24
Unknown Object (File)
Wed, Mar 27, 04:34
Unknown Object (File)
Sat, Mar 23, 08:50
Unknown Object (File)
Fri, Mar 22, 18:14
Unknown Object (File)
Fri, Mar 22, 17:51
Unknown Object (File)
Fri, Mar 22, 03:01
Unknown Object (File)
Mon, Mar 18, 08:24
Unknown Object (File)
Mon, Mar 18, 08:24
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
Lint Not Applicable
Unit
Tests Not Applicable

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.