Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

01/01/1970 Date Issue #399

@vs4vijay

Description

@vs4vijay

Hi,

I am trying to create a document with 1st January 1970 date, It is throwing following error:

NoMethodError: undefined method __bson_dump__' for Thu, 01 Jan 1970:Date
from /home/viz/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1/gems/moped-1.5.2/lib/moped/bson/extensions/hash.rb:15:in block in __bson_dump__'

And the statement I am using is this:

Profiles::Lead.last.update_attributes(prescription_date: "01/01/1970")

I am using Ruby version 1.9.3 with Mongoid version 3.1.6. I can not upgrade my ruby version but tried upgrading mongoid version to 4.0.0 and 5.0.0, couldn't upgrade because of some dependencies.

I think the problem is with Epoch time, Is there any solution to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions