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

Fix timestamp formatting #650

Merged
merged 2 commits into from
Aug 25, 2017
Merged

Conversation

dwsupplee
Copy link
Contributor

Closes: #648

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 25, 2017
@@ -252,7 +252,7 @@ private function formatTimestampForApi($value)
preg_match('/\.(\d{1,9})Z/', $value, $matches);
$value = preg_replace('/\.(\d{1,9})Z/', '.000000Z', $value);
$dt = \DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s.u\Z', $value);
$nanos = (isset($matches[1])) ? $matches[1] : 0;
$nanos = (isset($matches[1])) ? str_pad($matches[1], 9, '0') : 0;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@jdpedrie jdpedrie mentioned this pull request Aug 25, 2017
@dwsupplee dwsupplee merged commit a60ef7d into googleapis:master Aug 25, 2017
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.

4 participants