frappe / drive

100% open source file storage, sharing, and collaboration
https://frappe.io/drive
GNU Affero General Public License v3.0
293 stars 133 forks source link

Incorrect timezone on upload #233

Open hyperdatavn opened 2 months ago

hyperdatavn commented 2 months ago
uhrjun commented 2 months ago

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.

hyperdatavn commented 2 months ago

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

uhrjun commented 2 months ago

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.

hyperdatavn commented 2 months ago

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