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 resets to UTC when removing tzdata as per wiki #428

Open
shivpatel opened this issue Jul 23, 2018 · 2 comments
Open

Timezone resets to UTC when removing tzdata as per wiki #428

shivpatel opened this issue Jul 23, 2018 · 2 comments

Comments

@shivpatel
Copy link

I'm using node:10.1-alpine.

Following the steps from this Wiki page to setup the OS timezone: https://wiki.alpinelinux.org/wiki/Setting_the_timezone

I'm noticing that the system timezone gets reset to UTC if I cleanup and delete the tzdata package once I'm done setting up and confirming the correct timezone.

Not sure if the last step in that wiki needs to be removed or if I did something incorrectly to maintain the timezone preference?

Will result in image with UTC:
RUN apk add --update tzdata && cp /usr/share/zoneinfo/America/New_York /etc/localtime && echo "America/New_York" > /etc/timezone && apk del tzdata && rm -rf /var/cache/apk/* && rm -rf /usr/local/share/.cache

Will result in image with EDT:
RUN apk add --update tzdata && cp /usr/share/zoneinfo/America/New_York /etc/localtime && echo "America/New_York" > /etc/timezone && rm -rf /var/cache/apk/* && rm -rf /usr/local/share/.cache

@brammittendorff
Copy link

brammittendorff commented Oct 4, 2018

The you are probably using:

library-3.6
library-3.7
library-3.8

aarch64	Bump version 3.8.1	23 days ago
armhf	Bump version 3.8.1	23 days ago
ppc64le	Bump version 3.8.1	23 days ago
s390x	Bump version 3.8.1	23 days ago
x86	Bump version 3.8.1	23 days ago

23 Days ago there was a change setting the default timezone to UTC check:
https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/aarch64/Dockerfile
https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/armhf/Dockerfile
https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/ppc64le/Dockerfile
https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/s390x/Dockerfile
https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/x86/Dockerfile

@Dacesilian
Copy link

Dacesilian commented Jul 12, 2022

I have the same problem and I confirm that when I don't remove tzdata at the end, time is correct (image alpine:20220328)

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

No branches or pull requests

3 participants