drive icon indicating copy to clipboard operation
drive copied to clipboard

Incorrect timezone on upload

Open hyperdatavn opened this issue 1 year ago • 4 comments

  • After upload a file to Drive app, a timezone is incorrect, after update or preview a file then a timezone is correct again.

hyperdatavn avatar Aug 17 '24 02:08 hyperdatavn

Could you validate this on the latest release? I changed date format handling in https://github.com/frappe/drive/commit/429b9b5136139c214d2c62092a80a80934163044

If the issue still persists, attach a screenshot.

uhrjun avatar Sep 03 '24 16:09 uhrjun

Could you validate this on the latest release? I changed date format handling in 429b9b5

If the issue still persists, attach a screenshot.

Hi @uhrjun , i pull latest code in main branch. but look it still dont work as expectation ? As an image, why Created time is later Modified time ? image

hyperdatavn avatar Sep 04 '24 15:09 hyperdatavn

why Created time is later Modified time?

We can check modified date from the file, but browsers don't support checkingcreated date. So "Created" here is whenever you uploaded the file to drive. This behavior is consistent with other web clients such as NextCloud and Google Drive. Although I think should change the name from "Created" to "Uploaded" to avoid confusion here.

Unless I roll a custom client for uploading files, or find some server side way to recover the original created date. This will remain.

uhrjun avatar Sep 05 '24 08:09 uhrjun

why Created time is later Modified time?

We can check modified date from the file, but browsers don't support checkingcreated date. So "Created" here is whenever you uploaded the file to drive. This behavior is consistent with other web clients such as NextCloud and Google Drive. Although I think should change the name from "Created" to "Uploaded" to avoid confusion here.

Unless I roll a custom client for uploading files, or find some server side way to recover the original created date. This will remain.

Besides Createad Date make confused, I'm still facing wrong timezone after upload a file, although i just created new file, but after upload it display 7 hours ago. I think it related a timezone is handled incorrect. My timezone is UTC +7

image

hyperdatavn avatar Sep 08 '24 03:09 hyperdatavn

Any update for this issue..? I installed drive v0.0.12 and the issue still persist.

ERPInsight avatar Dec 01 '24 06:12 ERPInsight

I didn't change the 'created date' text, but the timezone should have been converted from the server's to the client's. ref: https://github.com/frappe/drive/commit/a5251ae562077a0f0757f047682768d985719426

Can you share a screenshot again?

uhrjun avatar Dec 02 '24 04:12 uhrjun

The time under the file itself is the last modified date. It's just shown in relative time, and that matches up with the last modified date time to the right.

Created has been changed to Uploaded on the UI to better clarify that it's the uploaded time. File API in browsers does not provide the real file creation date. commit: https://github.com/frappe/drive/commit/090eea4254d1b7ea59cb2a62cba61c7cbbcc0959

duplicate: https://discuss.frappe.io/t/error-time-zone-in-frappe-drive/138248

uhrjun avatar Dec 02 '24 05:12 uhrjun