Hi all, i got a record from my project server side database, like this : @user = User.find 1 then i cover @user to json format: @user.to_json the result : "created_at": "2009-01-28T12:29:32Z" what''s the T and Z of created_at field ? but i change Rails 2.2.2 to Rails1.1.6, I got : "created_at": "2009-01-28 12:29:32" this is a bug of the Rails2.2.2 ??? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Time Zone ? how to delete T && Z ? On Feb 23, 4:02 pm, 浩翔 <blackange...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > i got a record from my project server side database, like this : > > @user = User.find 1 > then i cover @user to json format: > @user.to_json > > the result : > "created_at": "2009-01-28T12:29:32Z" > > what''s the T and Z of created_at field ? > > but i change Rails 2.2.2 to Rails1.1.6, > > I got : > "created_at": "2009-01-28 12:29:32" > > this is a bug of the Rails2.2.2 ???--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 23/02/2009, at 7:02 PM, 浩翔 wrote:> > Hi all, > > i got a record from my project server side database, like this : > > @user = User.find 1 > then i cover @user to json format: > @user.to_json > > the result : > "created_at": "2009-01-28T12:29:32Z" > > what''s the T and Z of created_at field ?See RFC3339.> but i change Rails 2.2.2 to Rails1.1.6, > > I got : > "created_at": "2009-01-28 12:29:32" > > this is a bug of the Rails2.2.2 ???I would call it an improvement. "Z" means UTC, but you can convert to and use other timezones if you wish. The old way gives no clue as to timezone and is therefore incomplete. /d --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---