diff options
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, )); |