Closed JamesJJ closed 4 years ago
Thanks for the PR! LGTM
On a side note: upon checking Linux man pages, looks like it exists in the specification ... I wonder where I took the original set of specs from.
But yeah, at this point in time, an extension seems safer. We can consider adding %s
to the standard set in a future version
Please could you consider this PR for a default implementation to produce a Unix timestamp?
%s
is a standard pattern for a Unix timestamp, e.g in the ubiquitousdate
CLI command :Why not just use
Time.Unix
in golang's standard library?==> Use of
Time.Unix
requires compile-time awareness of the time string format, or separate templating. I feel it's important to conveniently support a strftime pattern for Unix timestamp representation to cover cases where the pattern is only known at runtime e.g specified in an application's configuration file.