How do I save my time settings?
#1
I would like to say a big thanks to all involved with the Pinebook Pro and MrFixit for a fantastic product.


I live in New Zealand and I can't save my time setting. I have gone from the desk top calendar to the edit button and set my city and the time. However later after a shutdown, when I turn my Pro on, I find that the time has gone back to GMT rather than the GMT+13. I have tried altering the time from both Rock and Root profiles. I then had a look at the debian help and when I tried the command "dpkg-reconfigure tzdata" in terminal I got the command not found message. Uncle Google wasn't forthcoming either,so here I am.
I am a newbee so I will need step by step instruction. My only other linux experience is with a Raspberry Pi and I tend to stick with desk top although I am starting to understand the terminal.

Thanks for any help in advance
#2
You can change symbolic link /etc/localtime to point to proper timezone.
#3
(01-04-2020, 09:04 AM)martinayotte Wrote: You can change symbolic link /etc/localtime to point to proper timezone.

Hi Thanks for that. 
I can find my way to /etc/localtime in both the terminal and on the desk top, but have no idea how to change the symbolic link.
#4
(01-04-2020, 02:06 PM)MrDitchy Wrote: but have no idea how to change the symbolic link.
You have to first delete it with "rm /etc/localtime" and then recreate new one with "ln -s <path_to_proper_timezone> /etc/localtime".
#5
(01-05-2020, 08:16 AM)martinayotte Wrote:
(01-04-2020, 02:06 PM)MrDitchy Wrote: but have no idea how to change the symbolic link.
You have to first delete it with "rm /etc/localtime" and then recreate new one with "ln -s <path_to_proper_timezone> /etc/localtime".

Thanks for that. As I am unsure of what the path to proper timezone is how do I find? out or is it a case of remove the /etc/localtime and just type as shown and do I do that in the /etc folder? Sorry for the repeated questions just I am very new to this.
#6
(01-05-2020, 01:06 PM)MrDitchy Wrote: As I am unsure of what the path to proper timezone is how do I find?
You can list all timezones available with "ls -lR /usr/share/zoneinfo", it will show many cities/contries/provinces/states as well as standard GMT+x.
You can then choose the one that fit you needs/wishes ...

In my case, I'm always use /usr/share/zoneinfo/America/Montreal .
#7
(01-06-2020, 08:41 AM)martinayotte Wrote:
(01-05-2020, 01:06 PM)MrDitchy Wrote: As I am unsure of what the path to proper timezone is how do I find?
You can list all timezones available with "ls -lR /usr/share/zoneinfo", it will show many cities/contries/provinces/states as well as standard GMT+x.
You can then choose the one that fit you needs/wishes ...

In my case, I'm always use /usr/share/zoneinfo/America/Montreal .

Thanks again. I tried "ls -lR /usr/share/zoneinfo" from root and got an invalid option but I think that was a typo involving a missing space between the "-lR" and the "/", so I explored the files and found my timezone . It is /usr/share/zoneinfo/Pacific/Auckland. So if I understand correctly from / I type "rm etc/localtime" then "In -s </usr/share/zoneinfo/Pacific/Auckland> /etc/localtime" 
Thanks for taking the timeout to help me, I don't want to break my OS over the timezone. I did notice that when the Pinebook Pro was restarted after a couple of days initially the time was correct and after a couple of minutes it reset it's self to GMT.
Thanks again
#8
I use these 2 commands, the first command will show the timezone and some other related info, the second command is an interactive way to change it (select your city from a list).



Code:
timedatectl

dpkg-reconfigure tzdata
#9
MrDitchy, if bash tells you "command not found" when you try and run dpkg-reconfigure, it's probably because you are trying to run it as a non-root user.

When you enter a command without specifying where it is, the shell looks in the directories specified in the PATH variable to find it.

You'll notice the root account has directories in it's PATH that are not typically present in a non-root account, and the dpkg-reconfigure command is in one of those directories, hence bash doesn't find it and says "command not found".

In your case simply use sudo (it will Switch User to root before DOing the command, invoke the command, then switch back after the command has run).


Code:
$ sudo dpkg-reconfigure tzdata
#10
(01-12-2020, 02:39 AM)NigelT Wrote: MrDitchy, if bash tells you "command not found" when you try and run dpkg-reconfigure, it's probably because you are trying to run it as a non-root user.

When you enter a command without specifying where it is, the shell looks in the directories specified in the PATH variable to find it.

You'll notice the root account has directories in it's PATH that are not typically present in a non-root account, and the dpkg-reconfigure command is in one of those directories, hence bash doesn't find it and says "command not found".

In your case simply use sudo (it will Switch User to root before DOing the command, invoke the command, then switch back after the command has run).


Code:
$ sudo dpkg-reconfigure tzdata

Thanks for that. It has worked.

I would like to thank both of you for taking the time out to help me. I have been a little late with responding, because for some reason my email decided to hide the posts in my spam folder and then not notify me. Thanks again


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Graphical Glitch in Settings sciolus 4 6,070 03-12-2021, 08:23 AM
Last Post: sciolus
  Network settings, where to find the config files? hvdkooij 1 3,329 11-20-2020, 02:47 PM
Last Post: xyzzy
  Saving ALSA settings? Baslow 9 11,071 09-04-2020, 09:05 AM
Last Post: brzegorz
  Very long lag time using SSH via Wifi in factory Debian OS Redbeard 4 6,195 02-16-2020, 10:19 AM
Last Post: wdt
  how I "fixed" Chromium crashing on accessing settings richfm 7 9,618 12-17-2019, 04:35 AM
Last Post: andybleaden@gmail.com

Forum Jump:


Users browsing this thread: 1 Guest(s)