-
Notifications
You must be signed in to change notification settings - Fork 1k
Add a datastore sample. #116
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
Conversation
appengine/flexible/datastore/app.php
Outdated
| use Symfony\Component\HttpFoundation\Response; | ||
|
|
||
| // Use UTC time. | ||
| date_default_timezone_set('UTC'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than set the system-wide default, we should set the timezone on a per-date basis like this:
$date = new DateTime();
$date->setTimezone(new DateTimeZone('UTC'));
//...
['timestampValue' => $date->format('Y-m-d\TH:i:s\Z')]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
Did we look into using tomwalder/php-gds at all for this sample? |
4f928b4 to
cfeca02
Compare
|
I didn't look at using using tomwalder/php-gds. I haven't seen us use third-party code like this in samples before. But that library looks good. Should I try using it in a follow-up PR? |
| { | ||
| "require": { | ||
| "silex/silex": "^1.3", | ||
| "google/apiclient": "~2.0@dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped.
|
LGTM |
cfeca02 to
8b34699
Compare
|
@SurferJeffAtGoogle I think it's worth looking into for a follow up PR. If we did use This is definitely LGTM! |
For https://cloud.google.com/appengine/docs/flexible/php/using-cloud-datastore