Skip to content

Instantly share code, notes, and snippets.

@alexdean
Created April 8, 2013 16:42
Show Gist options
  • Save alexdean/5338328 to your computer and use it in GitHub Desktop.
Save alexdean/5338328 to your computer and use it in GitHub Desktop.
convert time string to unix timestamp
#!/usr/bin/env ruby
require 'time'
t = Time.parse(ARGV[0])
puts "#{t.iso8601} -> #{t.to_i}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment