GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-php

Bad publishTime format used when publishTime not provided in the message context

Đang mở
#167 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug P3
Ngôn ngữ chính
PHP
Star
213
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Current format:
```php
gmdate('%Y-%m-%dT%H:%M:%S.%6NZ')
```
That produces, for example, this string `%2023-%09-%29GMT%13:%Sep:%th.%650` instead of the [RFC 3339](https://tools.ietf.org/html/rfc3339) format.

It's an easy fix; I'll send a Pull Request. This might also be relevant for https://github.com/GoogleCloudPlatform/functions-framework-php/issues/66

---

I came across this when testing my cloud function with the PubSub emulator. There was a similar issue in the node implementation: https://github.com/googleapis/google-cloud-node/issues/1925.

Ultimately, it would be great if the emulator included this property. Is there a right place to file an issue with the PubSub emulator?
I assume that this is beyond the scope of this PHP repo, nonetheless, from my tests, it seems like there are situations where the `publishTime` is present in the PubSub message (for example when I'm pulling the message via the PubSub API), but not present when the payload reaches the cloud functions framework.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.