Skip to content
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

fix(fcm): Use Invariant Culture when generating event_time #329

Closed
wants to merge 1 commit into from

Conversation

martinwiboe
Copy link

The current implementation uses the local culture to generate the event_time timestamp. If the local culture uses a non-US date format, the Firebase service will respond with an error code. This commit changes the implementation to always use the Invariant culture instead.

The current implementation uses the local culture to generate the `event_time` timestamp. If the local culture uses a non-US date format, the Firebase service will respond with an error code. This commit changes the implementation to always use the Invariant culture instead.
@InspectlyMads
Copy link

I think this would fix my issue with this exception: FirebaseAdmin.Messaging.FirebaseMessagingException: Invalid value at 'message.android.notification.event_time' (type.googleapis.com/google.protobuf.Timestamp), Field 'event_time', Invalid time format: Failed to parse input

@martinwiboe
Copy link
Author

@lahirumaramba sorry if it's not appropriate to tag you directly - but is there anything I need to do for this to be reviewed? The library is currently broken on non-US locales

@larsbloch
Copy link

@lahirumaramba

Hello. I am also blocked by this issue. Is it possible to look at this issue ?

InspectlyMads has made a fork with the change as this has not been merged
#330

Copy link

@larsbloch larsbloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect !

Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience folks!

Hey @martinwiboe, thanks for your contribution. LGTM! We will get a release out next week with this fix

@lahirumaramba lahirumaramba changed the title Use Invariant Culture when generating event_time Aug 30, 2024
@lahirumaramba
Copy link
Member

Moving this to #417 so we can stage test the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants