18.04 not showing correct time (not a dual boot issue)











up vote
2
down vote

favorite












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









share|improve this question









New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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 at 22:24










  • Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
    – Chris948
    Nov 22 at 22:54















up vote
2
down vote

favorite












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









share|improve this question









New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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 at 22:24










  • Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
    – Chris948
    Nov 22 at 22:54













up vote
2
down vote

favorite









up vote
2
down vote

favorite











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









share|improve this question









New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 22 at 22:28





















New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 22 at 22:18









Chris948

133




133




New contributor




Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Chris948 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • 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 at 22:24










  • Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
    – Chris948
    Nov 22 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 at 22:24










  • Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
    – Chris948
    Nov 22 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 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 at 22:24












Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 at 22:54




Deleted the last comment because it was irrelevant. Fixed, thank you. TZ variable.
– Chris948
Nov 22 at 22:54










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










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'





share|improve this answer





















    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',
    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
    });


    }
    });






    Chris948 is a new contributor. Be nice, and check out our Code of Conduct.










     

    draft saved


    draft discarded


















    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








    up vote
    2
    down vote



    accepted










    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'





    share|improve this answer

























      up vote
      2
      down vote



      accepted










      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'





      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        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'





        share|improve this answer












        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'






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 at 22:56









        Byte Commander

        62.1k26167279




        62.1k26167279






















            Chris948 is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            Chris948 is a new contributor. Be nice, and check out our Code of Conduct.













            Chris948 is a new contributor. Be nice, and check out our Code of Conduct.












            Chris948 is a new contributor. Be nice, and check out our Code of Conduct.















             


            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa