Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2760

Time in Array should demongoize into a localized Time

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      I'm opening a new issue because I think it's different from what I mentioned in MONGOID-2691.

      I have Mongoid.use_activesupport_time_zone: false

      >> l.shippings << Time.now
      => [2013-01-24 15:47:06 -0500]
      >> l.save
      => true
      >> l.reload
      >> l.shippings
      => [2013-01-24 20:47:06 UTC]
      
      
      >> l.created_at
      => 2013-01-29 08:49:45 -0500
      

      A field declared as Time (created_at) demongoize itself into a localized Time (although not an ActiveSupport::TimeWithZone), but not from withing an array (shippings). I would expect it to have the same behavior.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            fbernier fbernier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: