-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firestore] Invalid Date on some Android devices #545
Comments
@urajat Can I start by saying that I hate working with Dates, in any programming language, let alone when you've got to convert between 3 different ones! You'd think that after 40 years of software development (give or take) that somebody would have got them working properly... This sounds like a Javascript parsing issue. A quick search on RN shows that there are a few historical issues which indicate that apparently, if debug mode is enabled then date handling is done differently?! Do you have debug mode enabled? |
@urajat Just to confirm - with debug mode enabled, everything works fine. With debug mode disabled, it doesn't work. I'm going to look at using |
@chrisbianca +1 on the dates bit. I remember putting in a fix in Django 10 years ago for a timezone-related issue :-( I tried out the debug mode enabling/disabling part and can see that the issue is indeed there. With both emulator and device, with debug mode disabled, I get the |
@urajat Ok, I've just pushed up a fix - hopefully the last one! Are you able to test with the latest code? You can install using:
|
@chrisbianca Yes, this seems to work on both device and emulator in debug/non-debug modes on Android :-) |
Whoop, we got their eventually! Thanks for all your help - I'll get a release out either today or tomorrow with this change in |
Great! Thanks for the quick turnaround on this. |
Following on from: #533 (comment) courtesy of @urajat:
Just got around to testing this. 3.0.5 works on the emulator (tested on Android 7.1.1). But on the device with 7.1.1, this doesn't work - I get an Invalid Date value for the dates which are being read even though they work perfectly on the emulator and are correct on Firestore too. I added debugging statements in buildTypeMap to compare the values on device vs emulator - there is no change and the parsing is working as expected. I even tried going back to 3.0.4 and manually making the 'X' to 'Z' change to see if that helps, but nope - same Invalid Date issue on device. In the morning, I was testing with a 6.0.1 device where the Z option worked. Not sure if there's some other place where there is some date interpretation happening.
The text was updated successfully, but these errors were encountered: