Comments (13)
Looks like the difference in time is related to timezone (8hr for Shanghai). What time zone do you have on iPhone where you took picture, device (Mac?) where you saw iCloud data and device where you run docker image?
icloudpd uses local timezone (in docker in your case) to setup time.
from icloud_photos_downloader.
To show correct time in the log files inside my container, I install the tzdata package from the OS repo:
apk add --no-progress --no-cache tzdata
Maybe there is an issue with the pyinstaller tzdata package?
from icloud_photos_downloader.
To show correct time in the log files inside my container, I install the tzdata package
In other docker containers I saw ppl mounting /etc/localtime from the host, e.g. -v /etc/localtime:/etc/localtime:ro
. IIUC that approach does not need tzdata in container.
Maybe there is an issue with the pyinstaller tzdata package?
I wonder how can we reproduce the issue reliably?
from icloud_photos_downloader.
Maybe it's operating on different levels?
In this screenshot, it shows the correct time zone information in the log file (which should be handled by Python's tzdata package):
However, the date
command run immediately after shows a different date. This won't be using pyinstaller's tzdata and will be pulling the system time zone, which is defaulting to CST, at a guess.
from icloud_photos_downloader.
@bowencool zooming out a bit: how do you use OS-level attributes of the downloaded files? If your assets have right EXIF data inside, I assume all image manipulation software will use EXIF and don't pay attention to file attributes.
from icloud_photos_downloader.
Looks like the difference in time is related to timezone (8hr for Shanghai). What time zone do you have on iPhone where you took picture, device (Mac?) where you saw iCloud data and device where you run docker image?
icloudpd uses local timezone (in docker in your case) to setup time.
My iPhone, Mac, and NAS (unRAID) are all set to Beijing time (UTC +8), and they are all located in China. I'm not sure what the "C" in "CST" stands for, is it "China" or "Central"?
I'm checking the original information in the Photos app(MacOS):
I am accessing the file downloaded by unRAID using Finder via SMB:
from icloud_photos_downloader.
I am using MtPhotos to view EXIF data and have noticed conflicts within the data:
{
"ExifToolVersion": 12.4,
"FileName": "IMG_3842.JPG",
"FileModifyDate": "2023:11:10 04:00:37+08:00",
"FileAccessDate": "2023:11:10 04:00:37+08:00",
"FileInodeChangeDate": "2023:11:16 10:56:34+08:00",
"ModifyDate": "2023:11:09 20:00:37",
"DateTimeOriginal": "2023:11:09 20:00:37",
"CreateDate": "2023:11:09 20:00:37",
"GPSDateStamp": "2023:11:09",
"SubSecCreateDate": "2023:11:09 20:00:37.607+08:00",
"SubSecDateTimeOriginal": "2023:11:09 20:00:37.607+08:00",
"SubSecModifyDate": "2023:11:09 20:00:37+08:00",
"GPSDateTime": "2023:11:09 11:58:34Z"
// ...
}
The values for FileAccessDate
and FileModifyDate
are incorrect.
They should be either "2023-11-09 20:00:37+08:00" or "2023-11-09 12:00:37+00:00".
![image](https://private-user-images.githubusercontent.com/20217146/283356311-d3d0680d-1010-42a4-a6cb-98ce4cca3d19.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDYwMDY3MzAsIm5iZiI6MTcwNjAwNjQzMCwicGF0aCI6Ii8yMDIxNzE0Ni8yODMzNTYzMTEtZDNkMDY4MGQtMTAxMC00MmE0LWE2Y2ItOThjZTRjY2EzZDE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTIzVDEwNDAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlZTFjNTgwNGU0Njk3NTg3MzdiOTkzZjc2NjlhZGYzMWRkMzljN2I1MjI5MjYyNTAwYjUyYjgxN2FlMzE3MzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xmVHPPmqy1402WTHjqZ61rKOzMiLBNZOfDpfyKwm5ZE)
from icloud_photos_downloader.
From the data above, it looks to me:
- image was taken 2023-11-09 20:00:37+08:00 (this is CST); that is recorded as DateTimeOriginal without timezone info
- folder structure was correctly created using 09 day of month
- File attributes (Created & Modified) were set with extra 8hrs adjustment as if TZ was applied twice
Two approaches from here that I see:
- do not set file attributes at all and set correct expectations; rationale: IIUC, most/all image organizing and manipulating software use EXIF/XMP, not file attributes
- figure out why timezone calc was applied to file attributes incorrectly, fix, and, possibly, add extra setup to code/doc
I am leaning toward the former (remove file attributes at all) and would love to hear other opinions.
from icloud_photos_downloader.
From the data above, it looks to me:
- image was taken 2023-11-09 20:00:37+08:00 (this is CST); that is recorded as DateTimeOriginal without timezone info
- folder structure was correctly created using 09 day of month
- File attributes (Created & Modified) were set with extra 8hrs adjustment as if TZ was applied twice
Two approaches from here that I see:
- do not set file attributes at all and set correct expectations; rationale: IIUC, most/all image organizing and manipulating software use EXIF/XMP, not file attributes
- figure out why timezone calc was applied to file attributes incorrectly, fix, and, possibly, add extra setup to code/doc
I am leaning toward the former (remove file attributes at all) and would love to hear other opinions.
I recommend the latter.
We will miss this feature of setting file attributes if someone else fixes the TZ issue. This absence may confuse those who are accustomed to using it.
from icloud_photos_downloader.
... This absence may confuse those who are accustomed to using it.
I am trying to understand how people are accustomed to using file attributes of image/videos, especially if attributes are incorrect. Since attributes are incorrect (and I suspect for a long time) it is very reasonable to assume that they are not used at all. Are you using/relying of file attributes yourself? How? I do not pay any attention to them at all. BTW I don't rely on dates in folder hierarchy either, but storing all photos in one big folder has other challenges, so I am using hierarchy.
from icloud_photos_downloader.
... This absence may confuse those who are accustomed to using it.
I am trying to understand how people are accustomed to using file attributes of image/videos, especially if attributes are incorrect. Since attributes are incorrect (and I suspect for a long time) it is very reasonable to assume that they are not used at all. Are you using/relying of file attributes yourself? How? I do not pay any attention to them at all. BTW I don't rely on dates in folder hierarchy either, but storing all photos in one big folder has other challenges, so I am using hierarchy.
No, I'm not using file attributes.
from icloud_photos_downloader.
@bowencool pls check if 1.16.3 works for you and reopen the issue if it does not.
from icloud_photos_downloader.
@bowencool pls check if 1.16.3 works for you and reopen the issue if it does not.
I encountered #717 in various ways.
from icloud_photos_downloader.
Related Issues (20)
- Shared object error on setup HOT 4
- Path not readable HOT 1
- Add option to create file listing all albums contents HOT 1
- Error: Invalid value for '-d' / '--directory': Path 'P:\\Photos\\neu\\09 Delta iClouds\\Steffi' does not exist. HOT 2
- Version `GLIBC_2.35' not found on Debian Bullseye HOT 2
- Authorization for not 2fa account failed with error 'Invalid authentication token.' HOT 3
- 1.17.1 introduces ModuleNotFoundError: No module named 'starters' HOT 9
- impossible to generate a two-factor token HOT 7
- Totally New and need help HOT 3
- Support for bursts HOT 4
- Container on Synology NAS does not start HOT 17
- PyPI does not work with user/pass any more HOT 5
- 1.17.3 introduces "Permission denied" on Synology NAS HOT 11
- Support loading parameters from environment variables
- [Latest Edits] Allow downloading of edited files HOT 1
- Authorization for not 2fa account failed with error 'Missing apple_id field (Missing apple_id field)' HOT 1
- Can't login "Bad username or password for" HOT 2
- icloudpd 1.17.3: Unhandled Exception While Authenticating HOT 10
- Live pics are downloaded as HEIC and MOV
- Option to only download N oldest HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icloud_photos_downloader.