diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-11-12 18:24:57 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-11-12 18:24:57 +0100 |
commit | e0b797c43c9ce6e0f7acaba0606fd87cb580bc3f (patch) | |
tree | 6a242b43af3ed425bf3e214c699c4e7cf47881ff /apps | |
parent | 6e3a8416520e93b6a6b5ec38bda269aa6bfe38c3 (diff) | |
parent | f76419d190ab1557dcd333ebe7a9519340a2b0a7 (diff) | |
download | nextcloud-server-e0b797c43c9ce6e0f7acaba0606fd87cb580bc3f.tar.gz nextcloud-server-e0b797c43c9ce6e0f7acaba0606fd87cb580bc3f.zip |
Merge pull request #12087 from AdamWill/google-touch
google: fix touch() when $mtime is set (Google wants RFC3339) #11267
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/google.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 62b0f182e98..a4337bc937b 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -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, )); |