[Toybox] date with timezone
Frank Liu
gfrankliu at gmail.com
Tue May 25 13:28:12 PDT 2021
date doesn't seem to recognize the format with timezone info:
bash-5.0# a="2021-05-25 19:32:36.000000000 +0000"
bash-5.0# date -d "$a" +%s
date: bad date 2021-05-25 19:32:36.000000000 +0000
bash-5.0# /vol/debian/date -d "$a" +%s
1621971156
Removing timezone +0000 works:
bash-5.0# a="2021-05-25 19:32:36.000000000"
bash-5.0# date -d "$a" +%s
1621971156
Thanks!
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210525/e519e438/attachment.htm>
More information about the Toybox
mailing list