ActiveSupport::TimeWithZone inside an array not converted correctly

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 3.0.18
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      >> m = Member.first
      => #<Member _id: 4f148e43942179bcca000057, _type: "Member", keywords: [] >
      >> m.keywords[0] = Time.zone.now
      => Thu, 10 Jan 2013 16:27:37 EST -05:00
      >> m.save
      => true
      >> m = Member.first
      => #<Member _id: 4f148e43942179bcca000057, _type: "Member", keywords: [2013-01-10 16:27:37 UTC] >
      >> m.keywords
      => [2013-01-10 16:27:37 UTC]
      

      As you can see, I am saving a time in my current timezone into an array, then retrieving this same field and the time comes up as UTC with the very same hour.

      This has been causing quite a lot of troubles in our production apps... I investigated a little but I have not found the exact problem yet.

              Assignee:
              Unassigned
              Reporter:
              fbernier
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: