Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone setting is not documented #286

Closed
bildlich opened this issue Jan 14, 2021 · 6 comments
Closed

Timezone setting is not documented #286

bildlich opened this issue Jan 14, 2021 · 6 comments
Labels

Comments

@bildlich
Copy link

Overview

One of the examples in the Readme contains the timezone setting -e TZ=America/Los_Angeles but not reference how to use this setting.

In my case, this lead to me not using the setting, which gave me the warning /usr/lib/python3.8/site-packages/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC. warnings.warn('Can not find any timezone configuration, defaulting to UTC.')

Steps to Reproduce

  1. On a synology NAS, mount docker image with $ sudo docker pull icloudpd/icloudpd
  2. Create folders to store photos and cookie
  3. Run docker run -it --rm --name icloud \ -v myPath:/data \ -v myPath/cookies:/cookies \ icloudpd/icloudpd:latest \ icloudpd --directory /data \ --cookie-directory /cookies \ --folder-structure {:%Y%m%d} \ --username [iCloud username] \ --password [iCloud Password] \ --size original \ --recent 3 \ --auto-delete
  4. Perform 2FA
  5. Download starts. Get the warning /usr/lib/python3.8/site-packages/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC. warnings.warn('Can not find any timezone configuration, defaulting to UTC.')
  6. The files are successfully downloaded. It's unclear what the effect of the timezone configuration would have been.

Expected Behavior

  • The Readme says what the setting does, and what possible values are
  • The warning says what "defaulting to UTC" means in practice

Actual Behavior

See above

Context

Steps were taken on a Synology NAS via SSH from a Mac. The files seem to copy correctly. I can't verify if anything funky happened to the creation date and time of the photo.

@bildlich bildlich added the bug label Jan 14, 2021
@menkej
Copy link
Collaborator

menkej commented Jan 15, 2021

I'm not using docker so I can't reproduce. Seems like some info for timezones is missing from the base image. This is happening in other docker linux images as well. See p.e. here: jfloff/alpine-python#50

It's not really a bug, just a warning. But as far as I understand it can be solved by adding/configuring tzdata to the base image. So we probably have to add the following in Dockerfile.release

apk add tzdata
RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime

Maybe I find some time to try this out this weekend.

@boredazfcuk
Copy link
Contributor

I install tzdata in my Docker image and then start the container with the TZ variable to get rid of this warning.

IIRC it needs to know the time zone because it is required to calculate timestamps, presumably a dependency of the set-exif-datetime capability.

@menkej
Copy link
Collaborator

menkej commented Jan 15, 2021

Pull request #289 is already there. Thanks for confirming my research, @boredazfcuk !

@menkej
Copy link
Collaborator

menkej commented Jan 15, 2021

fixed with #289

@menkej menkej closed this as completed Jan 15, 2021
@bildlich
Copy link
Author

Thank you!

@N7l-00
Copy link

N7l-00 commented Sep 29, 2022

F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants