spec/date_parser_spec.rb in sugarcube-1.4.1 vs spec/date_parser_spec.rb in sugarcube-1.4.2
- old
+ new
@@ -25,39 +25,39 @@
end
describe "parses iso8601 dates" do
it "parses '2013-08-22T21:34:48.874Z'" do
- t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48.874Z")
+ t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48.874Z").getutc
t.month.should == 8
t.day.should == 22
t.year.should == 2013
t.min.should == 34
t.sec.should == 48
t.usec.should == 874000
end
it "parses '2013-08-22T21:34:48.874'" do
- t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48.874")
+ t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48.874").getutc
t.month.should == 8
t.day.should == 22
t.year.should == 2013
t.min.should == 34
t.sec.should == 48
t.usec.should == 874000
end
it "parses '2013-08-22T21:34:48Z'" do
- t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48Z")
+ t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48Z").getutc
t.month.should == 8
t.day.should == 22
t.year.should == 2013
t.min.should == 34
t.sec.floor.should == 48
end
it "parses '2013-08-22T21:34:48'" do
- t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48")
+ t = SugarCube::DateParser.parse_date("2013-08-22T21:34:48").getutc
t.month.should == 8
t.day.should == 22
t.year.should == 2013
t.min.should == 34
t.sec.floor.should == 48
\ No newline at end of file