Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

(Solved) How Do I Change UTC Time To Local Time

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

(Solved) How Do I Change UTC Time To Local Time

#1 Post by Rocky Bennett »

Hey guys,
I know this is a newbie question, but I have been all over the Debian web sites and tried all kinds of different commands, but this one simple little thing has me stumped. I am dual booting with Windows and I would like to set my Debian time to local time so that I can have a smooth transition when I change from one OS to another. I know that there has to be a simple command that will allow me to change my Debian time to local time, but I just can't seem to find it. In fact, when I run this command

dpkg-reconfigure tzdata

I see that the time is accurate, but the displayed time on the bottom of my screen is off by several hours, even though I have gone in and set it several times and hit apply. Every time that I open up Debian again, it has changed to a different displayed time.

I am running Debian Jessie 8.7 that was installed on a clean SSD about two weeks ago. There is no other OS on this SSD, Windows has its own SSD.

Any help for this total newbie would be greatly appreciated.

Rocky Bennett
Last edited by Rocky Bennett on 2017-03-03 19:57, edited 1 time in total.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: How Do I Change UTC Time To Local Time

#2 Post by dasein »

Sure, I'd be happy to do your searching for you...

The first two hits from a simple startpage search for the most
brain-dead obvious query I could think of (set time debian):

https://wiki.debian.org/DateTime
https://www.debian.org/doc/manuals/syst ... -time.html

Sheesh.

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#3 Post by Rocky Bennett »

I thought that I made it very clear in my first post that I had searched the different Debian web sites and tried many different things. Your attitude is most disgusting as a human being and I find your answer very rude.

Sorry, but there was nothing on either of those two pages that helped ME.

Of course I have heard about the attitude of this forum before I posted, but I thought that I would try anyway.

Thanks from a real newbie.

Rocky Bennett

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: How Do I Change UTC Time To Local Time

#4 Post by golinux »

Well, you've been on this forum for over a year so hardly a 'real newbie' imo.
May the FORK be with you!

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: How Do I Change UTC Time To Local Time

#5 Post by Segfault »

Rocky Bennett wrote:I thought that I made it very clear in my first post that I had searched the different Debian web sites and tried many different things.
Does this mean you edited /etc/adjtime as instructed in link provided by dasein? Telling us you tried many things may be great in Twitter, for a technical forum it is not informative at all. I concur with dasein post, so go ahead and start yelling at me, too.

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#6 Post by Rocky Bennett »

That was one of the first things I tried and I get a message that says "permission denied." I have su permission, and I am trying this command as root, but I still can not seem to run that command. I have edited my sources list in Nano, so I know I have root privileges, but this one command is stumping me.

Thank you very much for your assistance, I do not want to give up on this seemingly trivial task until I accomplish it.

Rocky

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How Do I Change UTC Time To Local Time

#7 Post by GarryRicketson »

by Rocky Bennett » and tried many different things
The wiki seems clear enough and what it says should work, it did for me,...but
I do not have MS malware on my system, so it is not exactly the same,...in
any event, the important thing is, for some reason the proceedures in the wiki
are not working for the OP,... so
to start with,..."and tried many different things",...that may be the problem,...
Did the OP keep notes on everything they tried ?, Could you (the OP)
post exactly , everything you have done,?..use code boxes please.
We need to know exactly what you did, or something a little more specific then
"many different things",...
One thing that cause this, is not shutting down properly.

There simply are a not enough details to be able to guess why the things that
normally would have worked, don't.
Showing us specificly , and accurately what you have tried, and done might give some
clues.
=========== off topic=======
Also, it would be help full , in order to keep the topic on topic, and
probably get better help, if the OP would leave out the unnecesary comments,
by Rocky Bennett »
Your attitude is most disgusting as a human being and I find your answer very rude.
-----snip---

Of course I have heard about the attitude of this forum before I posted, but I thought that I would try anyway.
The links Dasein posted , could have been helpfull and are, and at least he tried to help
you, by giving them to you. It is the OP's attitude that is the problem, the same,
usually most every body here has a pretty good attitude, but when we get "newbies" like this one, attitudes change, and these kind of comments just serve to drive off the people that would have been willing to try to help.
A simple, " Thanks, but I tried the things in that link, and they did not work", would
have prevented a whole bunch of problems, including this long offtopic comment,
So you have
heard about the attitude of this forum before I posted,
Well it sounds like you came here with a pre configured attitude, based on gosip, and
planned on responding to the first reply with your comments,..no matter what advice was given,... so it starts to stink, and I smell a troll. (It takes one to know one ),... :mrgreen:
Now that I have had breakfast and am full I am going to go back under my bridge.
And so I don't get bothered again:
Just Click YES

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: How Do I Change UTC Time To Local Time

#8 Post by Segfault »

Rocky Bennett wrote:That was one of the first things I tried and I get a message that says "permission denied."
Exact command(s) please which lead to permission denied message.
To check existing permissions:

Code: Select all

ls -l /etc/adjtime

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#9 Post by Rocky Bennett »

Again, thank you all very much for your assistance. I will continue to work on this and when I solve "my" problem, than I will post here the roadblock that was causing such a trivial issue to turn into a full blown conundrum.

Again, thanks for all of the assistance.
Rocky

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How Do I Change UTC Time To Local Time

#10 Post by GarryRicketson »

You are welcome,
I apologize if I sounded rude,..
But any way, please do let us know if you solve it, I do know it is frustrating
when one tries all the things that the docs, and manual say , and should work,
but they don't.
So if you do find a solution, it may help others as well in the future.
And since this is a pretty new topic, there still is a good chance someone
will come a along with some more help full information.

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#11 Post by Rocky Bennett »

Thank you Gerry, I will do that. In response to Segfault, this is the response I get to that command;


rocky@debian:~$ su
Password:
root@debian:/home/rocky# ls -l /etc/adjtime
-rw-r--r-- 1 root root 44 Mar 3 03:18 /etc/adjtime
root@debian:/home/rocky#


I had to spend some time with some hardware issues, but I am going to devote some more time to this puzzle as soon as I can.

Rocky

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#12 Post by Rocky Bennett »

Again, thank you all very much. I am very new to Debian, so I do apologize for the newbiness [sic.] of my question. I figured out the answer once I was able to clearly concentrate on the big issue. I was trying to follow the directions on this page;

https://wiki.debian.org/DateTime

to no avail. The reason was quite simple, that page does not take into consideration that total newbies might be using Debian. The page indicated that I should edit the file /etc/adjtime, but it did not clearly state how to do this. After I figured out that I was suppose to use the Nano editor to do this, all was clear as mud and I was able to accomplish my task.

Thanks again for all the help. I will create a new thread for my next question regarding screen tearing, and I hope that it all goes as smooth as silk.

Rocky

P.S. How do I mark this as solved?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How Do I Change UTC Time To Local Time

#13 Post by GarryRicketson »

your welcome,

You edit the subject line in your first post:
example:
subject:

Code: Select all

(solved)How Do I Change UTC Time To Local Time 

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: How Do I Change UTC Time To Local Time

#14 Post by dasein »

That would be the page I pointed you to right before you called me a "disgusting" human being. The one you claimed you had already tried (yeahrightsureuh-huh).
Rocky Bennett wrote:The page indicated that I should edit the file /etc/adjtime, but it did not clearly state how to do this. After I figured out that I was suppose to use the Nano editor...
For the benefit of others who may stumble on this thread, this is just flat wrong. Any text editor will work.

Off to add the OP to my ignore list.

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: How Do I Change UTC Time To Local Time

#15 Post by Rocky Bennett »

dasein wrote:
That would be the page I pointed you to right before you called me a "disgusting" human being.
Rocky Bennett wrote:The page indicated that I should edit the file /etc/adjtime, but it did not clearly state how to do this. After I figured out that I was suppose to use the Nano editor...
For the benefit of others who may stumble on this thread, this is just flat wrong. Any text editor will work.

Off to add the OP to my ignore list.

What you said about using any file editor is obviously correct, but that was not stated at all on that page. A total newbie like me actually would have no clue.

Rocky

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: (Solved) How Do I Change UTC Time To Local Time

#16 Post by GarryRicketson »

It would seem like it was clear enough, one would think most people
would logically come to the conclusion that in order to "Change" the file
they would need to edit it, so it probably never occurred to the original
author.
In any event, I edited it :
from: https://wiki.debian.org/DateTimeHardware clock and system time when dual booting

While Debian prefer to keep the hardware clock in UTC (this prevents the need to change it on daylight savings and timezone changes) other systems (like Windows) by default keeps the hardware clock synchronized to local time. To keep the hardware clock sane and the time correctly displayed by multiple systems they need to agree on which timezone the hardware clock is kept at.

In Debian the timezone for the hardware clock is configured in the file /etc/adjtime;

0.000000 14602224559 0.000000
1460224559
UTC
===== I added this comment =====
Edit /etc/addtime, and change "UTC" to "LOCAL" if you want the hardware clock to be kept at local time instead of UTC.

You do need to use sudo or su to edit this file, any editor will work,but nano or vi is the normal choice.
So any way, hope it is more clear to others,... looks like we need to also do a spanish translation on that page, but that is another topic.

User avatar
Rocky Bennett
Posts: 59
Joined: 2016-02-11 18:45

Re: (Solved) How Do I Change UTC Time To Local Time

#17 Post by Rocky Bennett »

Garry, Thank you very much for that alteration. Yes, there are people in the world that are so green that we need everything spelled out, I am sorry for any problems that I have caused. I am a happy Debian user and will continue to use and learn Debian as much as possible, but I am old and I do not think that I will ever learn enough to consider myself a novice. But such is life.

Thanks again.

Rocky

Post Reply