Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
e0b797c4
Commit
e0b797c4
authored
Nov 12, 2014
by
Vincent Petry
Browse files
Merge pull request #12087 from AdamWill/google-touch
google: fix touch() when $mtime is set (Google wants RFC3339) #11267
parents
6e3a8416
f76419d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/files_external/lib/google.php
View file @
e0b797c4
...
...
@@ -496,7 +496,10 @@ class Google extends \OC\Files\Storage\Common {
$result
=
false
;
if
(
$file
)
{
if
(
isset
(
$mtime
))
{
$file
->
setModifiedDate
(
$mtime
);
// This is just RFC3339, but frustratingly, GDrive's API *requires*
// the fractions portion be present, while no handy PHP constant
// for RFC3339 or ISO8601 includes it. So we do it ourselves.
$file
->
setModifiedDate
(
date
(
'Y-m-d\TH:i:s.uP'
,
$mtime
));
$result
=
$this
->
service
->
files
->
patch
(
$file
->
getId
(),
$file
,
array
(
'setModifiedDate'
=>
true
,
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment