Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 456 Bytes

learning_my_unix_tools.md

File metadata and controls

18 lines (12 loc) · 456 Bytes
path title
/learnings/my_unix_tools
Learnings: My Unix Tools

<<Learning_My_Unix_Tools>>

<>

date "+%s"
1425048734


# convert is8601 datestamp to epoch seconds
ruby -e 'require "date"; puts(DateTime.iso8601($*[0]).to_time.to_i)' "2015-02-27T14:50:34+00:00"


# convert seconds since epoch to Ruby DateTime objects...
ruby -e 'require "date"; puts DateTime.strptime($*[0], "%s")' 1425048634