Commit 5b244a2
authored
fix(fcm): Convert event_time to UTC (#403)
* fix(fcm): Convert event_time to UTC
- Check if the datetime object is naive or timezone aware
- If a naive datetime object is provided then set the timezone to local
timezone
- Convert the event_time to UTC Zulu format
* Remove the third party library
* Add new test case for naive event_timestamp
* Consider naive datetimes are in UTC
* Add a comment explaning the logic
* Update docs1 parent 08ed809 commit 5b244a2
File tree
3 files changed
+34
-4
lines changed- firebase_admin
- tests
3 files changed
+34
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
580 | | - | |
| 583 | + | |
581 | 584 | | |
582 | 585 | | |
583 | 586 | | |
| |||
601 | 604 | | |
602 | 605 | | |
603 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
604 | 629 | | |
605 | 630 | | |
606 | 631 | | |
| |||
0 commit comments