datetime - How do I simulate an SQL `timestamp` in plain old Ruby? -
i enforcing output of datetime zulu-time doing following
object.updated_at.utc.iso8601 # => "2013-05-12t10:47:01z" this works fine datetime when object persisting database timestamp instead get
"sun, 12 may 2013 10:47:01 utc +00:00" which not zulu time string.
i can fix by
object.updated_at.to_time.utc.iso8601 but trying unit test fix, , can't reproduce timestamp format test it.
how simulate sql timestamp such .utc.iso8601 returns "sun, 12 may 2013 10:47:01 utc +00:00", without wrapping in whole mess of activerecord etc?
turned out problem me not wearing glasses , misreading own test code. i'd close question except there no 'closing question because forgot glasses' option.
Comments
Post a Comment