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

Consolidate parsing of RFC 3339 datetime strings. #1336

Merged
merged 1 commit into from
Jan 7, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Dec 31, 2015

Adding helpers for conversion both to and from strings. Fixes #1146.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 31, 2015
@@ -298,6 +298,31 @@ def _total_seconds(offset):
return offset.total_seconds()


def _str_to_datetime(dt_str):

This comment was marked as spam.

This comment was marked as spam.

Adding helpers for conversion both to and from strings.
Fixes googleapis#1146.
@dhermes
Copy link
Contributor Author

dhermes commented Jan 7, 2016

@tseaver PTAL. Replaced with

git grep -l _str_to_datetime | xargs sed -i s/_str_to_datetime/_rfc3339_to_datetime/g
git grep -l _datetime_to_str | xargs sed -i s/_datetime_to_str/_datetime_to_rfc3339/g

@tseaver
Copy link
Contributor

tseaver commented Jan 7, 2016

LGTM

dhermes added a commit that referenced this pull request Jan 7, 2016
Consolidate parsing of RFC 3339 datetime strings.
@dhermes dhermes merged commit 978fd23 into googleapis:master Jan 7, 2016
@dhermes dhermes deleted the fix-1146 branch January 7, 2016 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core 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