On Tue, Jul 20, 2010 at 1:31 PM, Steve Root <[email protected]> wrote:

> If I save that to a regular string I get what looks correct to me:
> "2010-07-20 11:49:19"
> but saved in the entrycreated column it outputs as: "Sat Jan 01
> 11:49:19 UTC 2000"

How are you trying to save this? As a string?

>> bird = Bird.first
=> #<Bird id: 2, common_name: "hummingbird", species: "hoverus
buzzus", migratory: true, created_at: "2010-03-05 21:08:36",
updated_at: "2010-05-28 14:40:52", primary_food: "nectar",
secondary_food: "">
>> whenever = bird.created_at
=> Fri, 05 Mar 2010 21:08:36 UTC 00:00
>> whenever.class
=> ActiveSupport::TimeWithZone

So not a *string* here...

>> dt = DateTime.now
=> Tue, 20 Jul 2010 18:12:54 -0700
>> bird.created_at = dt
=> Tue, 20 Jul 2010 18:12:54 -0700
>> bird.save
=> true

So maybe you want to convert your string to a DateTime object and
save that? Just one possibility  :-)

-- 
Hassan Schroeder ------------------------ [email protected]
twitter: @hassan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to