firebase / firebase-admin-dotnet

Firebase Admin .NET SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
369 stars 131 forks source link

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

Closed martinwiboe closed 1 month ago

martinwiboe commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 11 months ago

@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 https://github.com/firebase/firebase-admin-dotnet/issues/330

lahirumaramba commented 1 month ago

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