DionisOdam
Posts: 6
Joined: Thu Jan 09, 2020 4:25 am

Can't set the proper time zone for Rpi4

Sun Feb 16, 2020 11:40 pm

Hello everyone

I am trying to change the default time zone of my Raspberry pi4 through the command sudo raspi-config, as the clock on my desktop is showing the wrong time and day. Apparently I can't find Canada between the available options. I'm in Vancouver and I didn't even seem to find a close city that I could select even from other countries. (Seattle in USA would have worked as well).

Does anybody have a suggestion about how to fix this?

much appreciated if you'd jump on this and help me to figure it out.

Cheers

MisterEd
Posts: 137
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 7:02 am

DionisOdam wrote:
Sun Feb 16, 2020 11:40 pm
Hello everyone

I am trying to change the default time zone of my Raspberry pi4 through the command sudo raspi-config, as the clock on my desktop is showing the wrong time and day. Apparently I can't find Canada between the available options. I'm in Vancouver and I didn't even seem to find a close city that I could select even from other countries. (Seattle in USA would have worked as well).

Does anybody have a suggestion about how to fix this?

much appreciated if you'd jump on this and help me to figure it out.

Cheers
Use the graphical version of raspbian configuration instead.
From the main menu select: Preferences > Raspberry Pi Configuration
Click on Localisation tab
Click on Set Timezone button and select
Area: Canada
Location: Pacific

User avatar
jojopi
Posts: 3190
Joined: Tue Oct 11, 2011 8:38 pm

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 6:16 pm

DionisOdam wrote:
Sun Feb 16, 2020 11:40 pm
Apparently I can't find Canada between the available options. I'm in Vancouver and I didn't even seem to find a close city that I could select even from other countries. (Seattle in USA would have worked as well).
In the first list, select "America". In the second, "Vancouver".

Were you confused that the options did not all fit on the screen? When you move up or down using the arrow keys, the list will start to scroll.

(Seattle is not an option. The biggest city in the same country and timezone is America/Los_Angeles.)

MisterEd
Posts: 137
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 7:46 pm

jojopi wrote:
Mon Feb 17, 2020 6:16 pm
DionisOdam wrote:
Sun Feb 16, 2020 11:40 pm
Apparently I can't find Canada between the available options. I'm in Vancouver and I didn't even seem to find a close city that I could select even from other countries. (Seattle in USA would have worked as well).
In the first list, select "America". In the second, "Vancouver".

Were you confused that the options did not all fit on the screen? When you move up or down using the arrow keys, the list will start to scroll.

(Seattle is not an option. The biggest city in the same country and timezone is America/Los_Angeles.)
Setting America & Vancouver is probably Vancouver, Washington. Setting Canada & Pacific is the more logical setting.
However both are essentially the same thing since both Vancouver, Washington and Vancouver, British Columbia are both in the Pacific time zone.

DionisOdam
Posts: 6
Joined: Thu Jan 09, 2020 4:25 am

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 10:24 pm

I changed the option through the graphical interface but weirdly enough it remains the same after I doing it. I also rebooted the pi but didn’t work.
Last edited by DionisOdam on Mon Feb 17, 2020 11:25 pm, edited 1 time in total.

klricks
Posts: 7021
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 11:12 pm

DionisOdam wrote:
Mon Feb 17, 2020 10:24 pm
I changed the option through the graphical interface but weirdly enough it remains the same after I did it. I also rebooted the pi but didn’t work.
Are you sure your Internet connection is good? Are the minutes and seconds correct?
An Internet connection to the RPi is required to get the correct GMT time to which the timezone offset is applied.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

DionisOdam
Posts: 6
Joined: Thu Jan 09, 2020 4:25 am

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 11:30 pm

klricks wrote:
Mon Feb 17, 2020 11:12 pm
DionisOdam wrote:
Mon Feb 17, 2020 10:24 pm
I changed the option through the graphical interface but weirdly enough it remains the same after I did it. I also rebooted the pi but didn’t work.
Are you sure your Internet connection is good? Are the minutes and seconds correct?
An Internet connection to the RPi is required to get the correct GMT time to which the timezone offset is applied.
Connection was good when I changed the options. Now that I rebooted connection doesn’t work anymore. This problem it happens often after rebooting. Usually I have to wait for 10 minutes before I can browse again but some days doesn’t work and I have to switch it off and leave it until the next day.

klricks
Posts: 7021
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 11:52 pm

DionisOdam wrote:
Mon Feb 17, 2020 11:30 pm
klricks wrote:
Mon Feb 17, 2020 11:12 pm
DionisOdam wrote:
Mon Feb 17, 2020 10:24 pm
I changed the option through the graphical interface but weirdly enough it remains the same after I did it. I also rebooted the pi but didn’t work.
Are you sure your Internet connection is good? Are the minutes and seconds correct?
An Internet connection to the RPi is required to get the correct GMT time to which the timezone offset is applied.
Connection was good when I changed the options. Now that I rebooted connection doesn’t work anymore. This problem it happens often after rebooting. Usually I have to wait for 10 minutes before I can browse again but some days doesn’t work and I have to switch it off and leave it until the next day.
Internet connection must be present shortly after each boot or the time does not get set.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
jojopi
Posts: 3190
Joined: Tue Oct 11, 2011 8:38 pm

Re: Can't set the proper time zone for Rpi4

Mon Feb 17, 2020 11:55 pm

MisterEd wrote:
Mon Feb 17, 2020 7:46 pm
Setting America & Vancouver is probably Vancouver, Washington.
No, it absolutely is not. The first question is "Please select the geographic area in which you live", and "America" refers to the entire continent. You would only have to try it before posting to see that the options in that continent include Buenos_Aires, Barbados, Belize, Bogota, ...

Maybe Uncle Sam has duplicates for all of those too, but I already mentioned that the places presented are generally the largest within each country and timezone, and US Pacific time is America/Los_Angeles.
Setting Canada & Pacific is the more logical setting.
It might be more logical to you, but it is less canonical to the system:

Code: Select all

[email protected]:~ $ file /usr/share/zoneinfo/Canada/Pacific 
/usr/share/zoneinfo/Canada/Pacific: symbolic link to ../America/Vancouver
However both are essentially the same thing since both Vancouver, Washington and Vancouver, British Columbia are both in the Pacific time zone.
America/Los_Angeles and America/Vancouver are distinct, because the dates of daylight savings changes historically differed, most recently in 1975. Each system timezone includes a full database of past transitions.

DionisOdam
Posts: 6
Joined: Thu Jan 09, 2020 4:25 am

Re: Can't set the proper time zone for Rpi4

Tue Feb 18, 2020 5:08 pm

I finally manage to get the pi connected to internet. I rebooted many times, but it seems that the problem was the router. I rebooted the router and then I turnd on and off the connection from the pi and now it seems to work fine.
The clock though, doesn't seem to have changed even now that I'm fully connected to internet. When I change the options, and click ok, it goes back as if I didn't do any change at all.
What could be causing this?
Any suggestions?

klricks
Posts: 7021
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can't set the proper time zone for Rpi4

Tue Feb 18, 2020 6:35 pm

DionisOdam wrote:
Tue Feb 18, 2020 5:08 pm
I finally manage to get the pi connected to internet. I rebooted many times, but it seems that the problem was the router. I rebooted the router and then I turnd on and off the connection from the pi and now it seems to work fine.
The clock though, doesn't seem to have changed even now that I'm fully connected to internet. When I change the options, and click ok, it goes back as if I didn't do any change at all.
What could be causing this?
Any suggestions?
Might have a read of this thread: viewtopic.php?f=28&t=253452
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

W. H. Heydt
Posts: 11978
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can't set the proper time zone for Rpi4

Tue Feb 18, 2020 6:55 pm

MisterEd wrote:
Mon Feb 17, 2020 7:46 pm
Setting America & Vancouver is probably Vancouver, Washington. Setting Canada & Pacific is the more logical setting.
However both are essentially the same thing since both Vancouver, Washington and Vancouver, British Columbia are both in the Pacific time zone.
Except for one thing that may cause problems a couple of times a year... I wouldn't care to bet that Canada shifts between Standard and Daylight time when the US does. (And, personally, I think the current US pattern is insane. But, then, I'd prefer to stay on Standard time *all* the time. Is is, after all...Standard.)

DionisOdam
Posts: 6
Joined: Thu Jan 09, 2020 4:25 am

Re: Can't set the proper time zone for Rpi4

Tue Feb 18, 2020 7:07 pm

klricks wrote:
Tue Feb 18, 2020 6:35 pm
DionisOdam wrote:
Tue Feb 18, 2020 5:08 pm
I finally manage to get the pi connected to internet. I rebooted many times, but it seems that the problem was the router. I rebooted the router and then I turnd on and off the connection from the pi and now it seems to work fine.
The clock though, doesn't seem to have changed even now that I'm fully connected to internet. When I change the options, and click ok, it goes back as if I didn't do any change at all.
What could be causing this?
Any suggestions?
Might have a read of this thread: viewtopic.php?f=28&t=253452
That definitely helped! Thanks a lot.

I runned the command

Code: Select all

sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
and now the clock is perfectly in sync. But strange enough though, when I run

Code: Select all

[email protected]:~ $ timedatectl
               Local time: Tue 2020-02-18 10:59:47 PST
           Universal time: Tue 2020-02-18 18:59:47 UTC
                 RTC time: n/a
                Time zone: America/Vancouver (PST, -0800)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no
Maybe it's correct like that?
Anyway seems to be solved. I'll try to reboot later and see whether something changed or not.

Return to “Troubleshooting”