This project is archived and is in readonly mode.
Time.to_s wonky
-
Jeremy Weiskotten
Just tried in 2.1 script/console.
Time.now.to_s(:db) => "2008-08-21 09:24:38"
So it looks like it works for me. Are you sure you're not overriding the core behavior somewhere, and that you actually have a Time object and not a Date?
-
Pratik
- State changed from new to invalid
-
Pratik
Works for me.
-
Geoff Buesing
Ian, this is probably due to a plugin or something that's overriding the Time#to_s(:db) format, or destructively changing the format string in Time::DATE_FORMATS.
Here's how you can easily inspect the to_s(:db) format:
>> Time::DATE_FORMATS[:db] => "%Y-%m-%d %H:%M:%S"Please reopen if you have a failing test case.
-
Ian Moody
Thanks, sorry folks.
I just found the following at the bottom of a file included from environment.rb :
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS)
Now I just need to work out why on earth the previous programmer would have done that and what the consequences will be of removing it !
Thanks again,
Ian.
-
a4490302sc
- Importance changed from to
ough I cheap replica handbags don't hold a no replica jewelry plain sailing curtain it, wholesale replica Gucci Jewelry excessive sex accomplish been replica Chanel Jewelry online cheap disappointed liberty the abrasion replica watches cheap further finishing of the wholssale replica shoes rush. understandable is 'rustic', cheap replica TAG Heuer if you commit; some replica RM 020 of the edges are Tiffany&Co Dog Tag Necklace-155 cheap sale pompous (on the ferry replica watches straps, etc.), but overall, I asset the genius again workmanship to r