I
Iain Barnett
Hi,
RSpec is taking a day off the date in my tests:
RSpec:
letvtime_start){ Time.now - 10 }
(logged) =3D> 2011-05-10 15:57:39 +0100
irb:
Time.now - 10
=3D> 2011-05-11 15:57:50 0100
system commandline:
$ date =
=20
=3D> Wed 11 May 2011 16:01:00 BST
irb again:
(Time.parse `date`.chomp) - 10
=3D> 2011-05-11 16:02:06 0100
I'm running ruby 1.9.2p0 (2010-08-18) [x86_64-darwin10.4.0], OSX 10.6.6, =
RSpec 2.5.2
Is there something about the way Ruby deals with time that I should look =
at, or have I done something stupid, or should I move this over to the =
RSpec list?
Any help is much appreciated.
Regards,
Iain=
RSpec is taking a day off the date in my tests:
RSpec:
letvtime_start){ Time.now - 10 }
(logged) =3D> 2011-05-10 15:57:39 +0100
irb:
Time.now - 10
=3D> 2011-05-11 15:57:50 0100
system commandline:
$ date =
=20
=3D> Wed 11 May 2011 16:01:00 BST
irb again:
(Time.parse `date`.chomp) - 10
=3D> 2011-05-11 16:02:06 0100
I'm running ruby 1.9.2p0 (2010-08-18) [x86_64-darwin10.4.0], OSX 10.6.6, =
RSpec 2.5.2
Is there something about the way Ruby deals with time that I should look =
at, or have I done something stupid, or should I move this over to the =
RSpec list?
Any help is much appreciated.
Regards,
Iain=