I am enforcing the output of a datetime
as Zulu-Time by doing the following
object.updated_at.utc.iso8601 # => "2013-05-12T10:47:01Z"
This works fine for a datetime
but when the object is persisting to a database as a timestamp
instead I get
"Sun, 12 May 2013 10:47:01 UTC +00:00"
Which is not a Zulu Time string.
I can fix this by
object.updated_at.to_time.utc.iso8601
but I am now trying to unit test this fix, and I can't reproduce the timestamp
format to test it.
How do I simulate an SQL timestamp
such that .utc.iso8601
returns "Sun, 12 May 2013 10:47:01 UTC +00:00", but without wrapping it in a whole mess of ActiveRecord etc?