18.04 not showing correct time (not a dual boot issue)
I realize that this is a common issue, but I can't find the fix to my problem.
Live in "America/Chicago (CST, -0600)" but ubuntu is showing UTC time.
It is 4pm local time here:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
So TimeDateCtl knows local time, but the Date command is showing me UTC
$ date
Thu Nov 22 22:15:54 Chicago 2018
I have made sure that the BIOS time is UTC, and my service is started up, just wrong.
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-11-22 22:07:07 Chicago; 9min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 1360 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
└─1360 /lib/systemd/systemd-timesyncd
What else do I try? I set it to local time and back, I've restarted every service I can find.
Edit, I don't see a problem here either:
sudo hwclock --debug
hwclock from util-linux 2.31.1
System Time: 1542925579.769423
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/11/22 22:26:20
Hw clock time : 2018/11/22 22:26:20 = 1542925580 seconds since 1969
Time since last adjustment is 1542925580 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-11-22 22:26:19.764979+0000
18.04 time
add a comment |
I realize that this is a common issue, but I can't find the fix to my problem.
Live in "America/Chicago (CST, -0600)" but ubuntu is showing UTC time.
It is 4pm local time here:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
So TimeDateCtl knows local time, but the Date command is showing me UTC
$ date
Thu Nov 22 22:15:54 Chicago 2018
I have made sure that the BIOS time is UTC, and my service is started up, just wrong.
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-11-22 22:07:07 Chicago; 9min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 1360 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
└─1360 /lib/systemd/systemd-timesyncd
What else do I try? I set it to local time and back, I've restarted every service I can find.
Edit, I don't see a problem here either:
sudo hwclock --debug
hwclock from util-linux 2.31.1
System Time: 1542925579.769423
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/11/22 22:26:20
Hw clock time : 2018/11/22 22:26:20 = 1542925580 seconds since 1969
Time since last adjustment is 1542925580 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-11-22 22:26:19.764979+0000
18.04 time
Do you have theTZ
environment variable set? Check the output ofecho $TZ
. That variable would override the timezonedate
shows, but not whattimedatectl
reports.
– Byte Commander
Nov 22 '18 at 22:24
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54
add a comment |
I realize that this is a common issue, but I can't find the fix to my problem.
Live in "America/Chicago (CST, -0600)" but ubuntu is showing UTC time.
It is 4pm local time here:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
So TimeDateCtl knows local time, but the Date command is showing me UTC
$ date
Thu Nov 22 22:15:54 Chicago 2018
I have made sure that the BIOS time is UTC, and my service is started up, just wrong.
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-11-22 22:07:07 Chicago; 9min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 1360 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
└─1360 /lib/systemd/systemd-timesyncd
What else do I try? I set it to local time and back, I've restarted every service I can find.
Edit, I don't see a problem here either:
sudo hwclock --debug
hwclock from util-linux 2.31.1
System Time: 1542925579.769423
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/11/22 22:26:20
Hw clock time : 2018/11/22 22:26:20 = 1542925580 seconds since 1969
Time since last adjustment is 1542925580 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-11-22 22:26:19.764979+0000
18.04 time
I realize that this is a common issue, but I can't find the fix to my problem.
Live in "America/Chicago (CST, -0600)" but ubuntu is showing UTC time.
It is 4pm local time here:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
So TimeDateCtl knows local time, but the Date command is showing me UTC
$ date
Thu Nov 22 22:15:54 Chicago 2018
I have made sure that the BIOS time is UTC, and my service is started up, just wrong.
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-11-22 22:07:07 Chicago; 9min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 1360 (systemd-timesyn)
Status: "Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
└─1360 /lib/systemd/systemd-timesyncd
What else do I try? I set it to local time and back, I've restarted every service I can find.
Edit, I don't see a problem here either:
sudo hwclock --debug
hwclock from util-linux 2.31.1
System Time: 1542925579.769423
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/11/22 22:26:20
Hw clock time : 2018/11/22 22:26:20 = 1542925580 seconds since 1969
Time since last adjustment is 1542925580 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-11-22 22:26:19.764979+0000
18.04 time
18.04 time
edited Nov 22 '18 at 22:28
asked Nov 22 '18 at 22:18
Chris948
133
133
Do you have theTZ
environment variable set? Check the output ofecho $TZ
. That variable would override the timezonedate
shows, but not whattimedatectl
reports.
– Byte Commander
Nov 22 '18 at 22:24
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54
add a comment |
Do you have theTZ
environment variable set? Check the output ofecho $TZ
. That variable would override the timezonedate
shows, but not whattimedatectl
reports.
– Byte Commander
Nov 22 '18 at 22:24
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54
Do you have the
TZ
environment variable set? Check the output of echo $TZ
. That variable would override the timezone date
shows, but not what timedatectl
reports.– Byte Commander
Nov 22 '18 at 22:24
Do you have the
TZ
environment variable set? Check the output of echo $TZ
. That variable would override the timezone date
shows, but not what timedatectl
reports.– Byte Commander
Nov 22 '18 at 22:24
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54
add a comment |
1 Answer
1
active
oldest
votes
Your environment variable TZ
is the cause of the problem.
$ echo $TZ
Chicago/New_York
Chicago/New_York
is an invalid time zone, so date
will default to UTC instead, but for some reason still display the first part of the zone name as time zone, resulting in:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
$ date
Thu Nov 22 22:15:54 Chicago 2018
Now to fix the issue, we just need to find out where that wrong value is set and delete the line. Search for something like one of the lines below in your shell/profile initialization scripts, like ~/.profile
, ~/.bashrc
or if it affects all users maybe even /etc/environment
, /etc/profile
, /etc/profile.d/*
or /etc/bash.bashrc
:
TZ='Chicago/New_York'
export TZ='Chicago/New_York'
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095230%2f18-04-not-showing-correct-time-not-a-dual-boot-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your environment variable TZ
is the cause of the problem.
$ echo $TZ
Chicago/New_York
Chicago/New_York
is an invalid time zone, so date
will default to UTC instead, but for some reason still display the first part of the zone name as time zone, resulting in:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
$ date
Thu Nov 22 22:15:54 Chicago 2018
Now to fix the issue, we just need to find out where that wrong value is set and delete the line. Search for something like one of the lines below in your shell/profile initialization scripts, like ~/.profile
, ~/.bashrc
or if it affects all users maybe even /etc/environment
, /etc/profile
, /etc/profile.d/*
or /etc/bash.bashrc
:
TZ='Chicago/New_York'
export TZ='Chicago/New_York'
add a comment |
Your environment variable TZ
is the cause of the problem.
$ echo $TZ
Chicago/New_York
Chicago/New_York
is an invalid time zone, so date
will default to UTC instead, but for some reason still display the first part of the zone name as time zone, resulting in:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
$ date
Thu Nov 22 22:15:54 Chicago 2018
Now to fix the issue, we just need to find out where that wrong value is set and delete the line. Search for something like one of the lines below in your shell/profile initialization scripts, like ~/.profile
, ~/.bashrc
or if it affects all users maybe even /etc/environment
, /etc/profile
, /etc/profile.d/*
or /etc/bash.bashrc
:
TZ='Chicago/New_York'
export TZ='Chicago/New_York'
add a comment |
Your environment variable TZ
is the cause of the problem.
$ echo $TZ
Chicago/New_York
Chicago/New_York
is an invalid time zone, so date
will default to UTC instead, but for some reason still display the first part of the zone name as time zone, resulting in:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
$ date
Thu Nov 22 22:15:54 Chicago 2018
Now to fix the issue, we just need to find out where that wrong value is set and delete the line. Search for something like one of the lines below in your shell/profile initialization scripts, like ~/.profile
, ~/.bashrc
or if it affects all users maybe even /etc/environment
, /etc/profile
, /etc/profile.d/*
or /etc/bash.bashrc
:
TZ='Chicago/New_York'
export TZ='Chicago/New_York'
Your environment variable TZ
is the cause of the problem.
$ echo $TZ
Chicago/New_York
Chicago/New_York
is an invalid time zone, so date
will default to UTC instead, but for some reason still display the first part of the zone name as time zone, resulting in:
$ timedatectl
Local time: Thu 2018-11-22 16:11:47 CST
Universal time: Thu 2018-11-22 22:11:47 UTC
RTC time: Thu 2018-11-22 22:11:47
Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
$ date
Thu Nov 22 22:15:54 Chicago 2018
Now to fix the issue, we just need to find out where that wrong value is set and delete the line. Search for something like one of the lines below in your shell/profile initialization scripts, like ~/.profile
, ~/.bashrc
or if it affects all users maybe even /etc/environment
, /etc/profile
, /etc/profile.d/*
or /etc/bash.bashrc
:
TZ='Chicago/New_York'
export TZ='Chicago/New_York'
answered Nov 22 '18 at 22:56
Byte Commander
63k26171287
63k26171287
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095230%2f18-04-not-showing-correct-time-not-a-dual-boot-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you have the
TZ
environment variable set? Check the output ofecho $TZ
. That variable would override the timezonedate
shows, but not whattimedatectl
reports.– Byte Commander
Nov 22 '18 at 22:24
Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 '18 at 22:54