[ create a new paste ] login | about

Link: http://codepad.org/LcWydY5t    [ raw code | output | fork ]

Ruby, pasted on Dec 7:
1
2
3
4
5
require 'date'

str = "2010-12-02_12-10-26"
puts str
puts DateTime.strptime(str, "%Y-%m-%d_%H-%M-%S")


Output:
1
2
2010-12-02_12-10-26
2010-12-02T12:10:26+00:00


Create a new paste based on this one


Comments: