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

If the pubsub function is implemented in 2gen, the publishTime is 1970/01/01 00:00:00. #7441

Closed
ytetsuro opened this issue Jul 12, 2024 · 1 comment · Fixed by #7454
Closed

Comments

@ytetsuro
Copy link

Invalid value for publishTime.
I use this publishTime to determine retry timeouts, so I don't want this to break.

[REQUIRED] Environment info

firebase-tools:

13.13.2

Platform:

Mac OS 14.4

[REQUIRED] Test case

const example = onMessagePublished(
  {
    topic: 'example',
    timeoutSeconds: 540,
    memory: '2GiB',
    retry: true,
  },
 (event: CloudEvent<MessagePublishedData>) => {
    console.log(event.data.message.publishTime); //1970/01/01 00:00:00
  },
);

[REQUIRED] Steps to reproduce

Start the emulator with the following command and call pubsub.

firebase emulators:start

[REQUIRED] Expected behavior

The date and time will be the PUBLISHED date and time.
In addition, as a supplement, the current date and time are entered for 1gen.

[REQUIRED] Actual behavior

publishTime is 1970/01/01 00:00:00

@aalej
Copy link
Contributor

aalej commented Jul 16, 2024

Hey @ytetsuro, thanks for raising this and for creating a detailed report! I’m able to reproduce the behavior mentioned using the provided code snippet. Let me notify our engineering team about this so they can investigate. I’ll also be marking this as reproducible.

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

Successfully merging a pull request may close this issue.

2 participants