这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@eleddie
Copy link
Contributor

@eleddie eleddie commented Aug 21, 2019

When using the format YYYY-MM-DDTHH:mm:ss.SSSZ it works fine on ios but on android it gives the following error:
Unparseable date: "2019-08-22T15:00:00.000-05:00"

To fix this, people use the format YYYY-MM-DDTHH:mm:ss.SSS[Z] which gives 2019-08-22T15:00:00.000Z and works fine.

The problem is that since I am in a different timezone (GTM-5) that part gets lost when using the latter time format and the event is added 5 hours earlier than the actual time passed.

This PR adds the ability to skip setting the time format on the native side by setting skipAndroidTimezone: true in the details passed to saveEvent.

Ideally the library should accept the format YYYY-MM-DDTHH:mm:ss.SSSZso the timezone part doesn't get lost.

This probably fixes #229 and #232 which are closed but I didn't find my answer there

@eleddie
Copy link
Contributor Author

eleddie commented Aug 26, 2019

Any chance this could be merged? I really need this fix

@eleddie
Copy link
Contributor Author

eleddie commented Sep 17, 2019

Is this repo live?

@drac94
Copy link

drac94 commented Sep 25, 2019

I am facing this issue too, I didn't check all the library but why doesn't the library just change the format to YYYY-MM-DDTHH:mm:ss.SSSZ? I'm guessing there are more things involved, if that's the case can we at least merge the @eleddie proposal, please?

@eleddie
Copy link
Contributor Author

eleddie commented Sep 25, 2019

I forked the repo with this change. You can use it like "react-native-calendar-events":"eleddie/react-native-calendar-events#master"
That's what I'm doing since there's no response.

@wmcmahan wmcmahan merged commit 1590fe5 into wmcmahan:master Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timezone problems

3 participants