bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 164 forks source link

ISODate bug #130

Closed Scorpiion closed 11 years ago

Scorpiion commented 11 years ago

Hi, been using Genghisapp for a while now it's really nice I must say!

I have one problem though, ISODate does not really work as expected when I try to edit or create entries. I'm not completely sure if it's only me, but I don't think so.

To recreate, add a document like this: { uptime: ISODate("0001-01-01T01:00:00+01:00") }

And if the bug is not only me, the saved value will become something like this: { uptime: ISODate("1901-01-01T01:00:00+01:00") }

It can fetch and present ISODate("0001-01-01T01:00:00+01:00") just fine if it's already in the database, but it can't add it manually from the interface or edit a document manually.

bobthecow commented 11 years ago

Arrgh. JavaScript. I bet you thought weren't going to get bitten by a y2k bug in 2013, right?

The branch hotfix/2.3.8 should contain a fix for this. Do you mind testing it?

Funny story: the mongo shell has the same bug, because it's using almost the exact same date handling I was :-/

bobthecow commented 11 years ago

This has been released in v2.3.8. Thanks for reporting it!

Scorpiion commented 11 years ago

Hi, sorry I have not had the time to reply earlier.

Works great with the new release, thanks for the quick fix!

bobthecow commented 11 years ago

No worries. Thanks for taking a look!