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

Pubsub: Make 'Message.publish_time' return datetime #5633

Merged
merged 2 commits into from
Jul 17, 2018

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Jul 16, 2018

Closes #5598

tseaver added 2 commits July 16, 2018 17:04
Derive from known datetime.
Rather than a 'google.protobuf.timestamp_pb2.Timestamp' instance.

Closes #5598.
@tseaver tseaver added the api: pubsub Issues related to the Pub/Sub API. label Jul 16, 2018
@tseaver tseaver requested review from tswast and theacodes July 16, 2018 21:39
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 16, 2018
timestamp = self._message.publish_time
delta = datetime.timedelta(
seconds=timestamp.seconds,
microseconds=timestamp.nanos // 1000)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver tseaver merged commit 861d51a into master Jul 17, 2018
@tseaver tseaver deleted the 5598-pubsub-message-publish_time-as-datetime branch July 17, 2018 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants