realm-studio
realm-studio copied to clipboard
Dates outside JS range breaks Studio
If your data model has a value that is apparently outside the dates supported by RealmJS, Studio fails to show anything from the selected table, but instead just shows "Invalid Time Value".
IMO, this should be restricted to just the single field and maybe rephrase to something like "Cannot show this value"

Or perhaps Studio/Realm js should represent dates as moment objects as those are likely capable of representing broader range.
Can you upload a Realm containing an invalid date? Or perhaps provide an example on how to create such a value?
It happened after creating some random date values using random.nextLong() in Java... I suspect that using e.g. Long.MAX_VALUE will trigger it, but I'll try to create an example Realm.
This Realm contains a class DateTest with 4 objects with the values:
Date(Long.MAX_VALUE)
Date(Long.MIN_VALUE)
Date(0)
Date.now()
It exhibits the same behaviour as above.