-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix double conversion of datetime for log entries. #3144
Fix double conversion of datetime for log entries. #3144
Conversation
logging/unit_tests/test__gax.py
Outdated
@@ -412,7 +412,7 @@ def test_write_entries_w_extra_properties(self): | |||
'severity': SEVERITY, | |||
'labels': LABELS, | |||
'insertId': IID, | |||
'timestamp': NOW, | |||
'timestamp': NOW.strftime("%Y-%m-%dT%H:%M:%S.%fZ"), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
logging/unit_tests/test__gax.py
Outdated
@@ -412,7 +412,7 @@ def test_write_entries_w_extra_properties(self): | |||
'severity': SEVERITY, | |||
'labels': LABELS, | |||
'insertId': IID, | |||
'timestamp': NOW, | |||
'timestamp': NOW.strftime("%Y-%m-%dT%H:%M:%S.%fZ"), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
logging/unit_tests/test_logger.py
Outdated
{'textPayload': TEXT, 'insertId': IID1, 'timestamp': TIMESTAMP1}, | ||
{'jsonPayload': STRUCT, 'insertId': IID2, 'timestamp': TIMESTAMP2}, | ||
{'textPayload': TEXT, 'insertId': IID1, | ||
'timestamp': TIMESTAMP1.strftime("%Y-%m-%dT%H:%M:%S.%fZ")}, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
system_tests/logging_.py
Outdated
entries = _list_entries(logger) | ||
self.assertEqual(len(entries), 1) | ||
self.assertEqual(entries[0].payload, text_payload) | ||
# self.assertEqual(entries[0].timestamp, now) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tseaver updated! |
Gah..forgot to squash...apologies. |
@daspecster thanks for the swift fix ! |
@Fkawala thanks for tracking it down! |
…me-conversion Fix double conversion of datetime for log entries.
Fixes: #3129
This should fix the double conversion issue.
/cc @waprin