Setting Time in Lubuntu











up vote
1
down vote

favorite
1












I have a time server running on a server PC that is meant to change the times of various guest PCs as a result of a TCP/IP command on port 9000 issued by a control application running on an integrated controller. I have everything running the way I would like except that every time I try to set the time on my clients or my server PC using the following:



sudo hwclock --set --date="2014-01-30 12:00:00"
sudo hwclock --hctosys


the time changes to my issued value and then moments later the time reverts back to what it was initially. I've tried using these commands on a guest pc with ntp stopped, and no network connectivity with the /etc/localtime file deleted and it still does this. I'm using the latest version of Lubuntu currently. Does anyone know why this might be happening?



By the by, when I say "PC" I am referring to virtual machines I have running in VirtualBox. Eventually this will go onto real PCs but for now I'm working virtually.










share|improve this question
























  • --hctosys will also set the timezone, are you sure its set correctly?
    – Burhan Khalid
    Jan 31 '14 at 12:29










  • From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
    – Dan Snyder
    Jan 31 '14 at 12:39















up vote
1
down vote

favorite
1












I have a time server running on a server PC that is meant to change the times of various guest PCs as a result of a TCP/IP command on port 9000 issued by a control application running on an integrated controller. I have everything running the way I would like except that every time I try to set the time on my clients or my server PC using the following:



sudo hwclock --set --date="2014-01-30 12:00:00"
sudo hwclock --hctosys


the time changes to my issued value and then moments later the time reverts back to what it was initially. I've tried using these commands on a guest pc with ntp stopped, and no network connectivity with the /etc/localtime file deleted and it still does this. I'm using the latest version of Lubuntu currently. Does anyone know why this might be happening?



By the by, when I say "PC" I am referring to virtual machines I have running in VirtualBox. Eventually this will go onto real PCs but for now I'm working virtually.










share|improve this question
























  • --hctosys will also set the timezone, are you sure its set correctly?
    – Burhan Khalid
    Jan 31 '14 at 12:29










  • From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
    – Dan Snyder
    Jan 31 '14 at 12:39













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have a time server running on a server PC that is meant to change the times of various guest PCs as a result of a TCP/IP command on port 9000 issued by a control application running on an integrated controller. I have everything running the way I would like except that every time I try to set the time on my clients or my server PC using the following:



sudo hwclock --set --date="2014-01-30 12:00:00"
sudo hwclock --hctosys


the time changes to my issued value and then moments later the time reverts back to what it was initially. I've tried using these commands on a guest pc with ntp stopped, and no network connectivity with the /etc/localtime file deleted and it still does this. I'm using the latest version of Lubuntu currently. Does anyone know why this might be happening?



By the by, when I say "PC" I am referring to virtual machines I have running in VirtualBox. Eventually this will go onto real PCs but for now I'm working virtually.










share|improve this question















I have a time server running on a server PC that is meant to change the times of various guest PCs as a result of a TCP/IP command on port 9000 issued by a control application running on an integrated controller. I have everything running the way I would like except that every time I try to set the time on my clients or my server PC using the following:



sudo hwclock --set --date="2014-01-30 12:00:00"
sudo hwclock --hctosys


the time changes to my issued value and then moments later the time reverts back to what it was initially. I've tried using these commands on a guest pc with ntp stopped, and no network connectivity with the /etc/localtime file deleted and it still does this. I'm using the latest version of Lubuntu currently. Does anyone know why this might be happening?



By the by, when I say "PC" I am referring to virtual machines I have running in VirtualBox. Eventually this will go onto real PCs but for now I'm working virtually.







linux ubuntu date-time ntp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 '14 at 12:26

























asked Jan 31 '14 at 8:11









Dan Snyder

10613




10613












  • --hctosys will also set the timezone, are you sure its set correctly?
    – Burhan Khalid
    Jan 31 '14 at 12:29










  • From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
    – Dan Snyder
    Jan 31 '14 at 12:39


















  • --hctosys will also set the timezone, are you sure its set correctly?
    – Burhan Khalid
    Jan 31 '14 at 12:29










  • From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
    – Dan Snyder
    Jan 31 '14 at 12:39
















--hctosys will also set the timezone, are you sure its set correctly?
– Burhan Khalid
Jan 31 '14 at 12:29




--hctosys will also set the timezone, are you sure its set correctly?
– Burhan Khalid
Jan 31 '14 at 12:29












From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
– Dan Snyder
Jan 31 '14 at 12:39




From what I understand the timezone specifies an offset. In most cases this is in increments of hours (half hours for certain zones like Kabul). So even if I was resetting the timezone to be my own, I would expect at least minutes to match my input +- 30 minutes worst case.
– Dan Snyder
Jan 31 '14 at 12:39










2 Answers
2






active

oldest

votes

















up vote
0
down vote













Maybe you enabled the time synchronisation between host and guests?



See here:
Using virtual box is it possible to set your virtual machine time to be different from host time



Just a thought.



I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).






share|improve this answer























  • You will be able to add comments to any post after gaining 50 points to reputation.
    – pabouk
    Jan 31 '14 at 9:07










  • Ok, thanks for the clarification on that!
    – Marlon
    Jan 31 '14 at 11:17










  • Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
    – Dan Snyder
    Jan 31 '14 at 12:14












  • Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
    – Dan Snyder
    Jan 31 '14 at 12:21










  • Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
    – Dan Snyder
    Jan 31 '14 at 13:10




















up vote
0
down vote













Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:



disable time sync instructions



Simply change line



daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null



in "/etc/init.d/vboxadd-service"



Cheers






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f709502%2fsetting-time-in-lubuntu%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Maybe you enabled the time synchronisation between host and guests?



    See here:
    Using virtual box is it possible to set your virtual machine time to be different from host time



    Just a thought.



    I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).






    share|improve this answer























    • You will be able to add comments to any post after gaining 50 points to reputation.
      – pabouk
      Jan 31 '14 at 9:07










    • Ok, thanks for the clarification on that!
      – Marlon
      Jan 31 '14 at 11:17










    • Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
      – Dan Snyder
      Jan 31 '14 at 12:14












    • Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
      – Dan Snyder
      Jan 31 '14 at 12:21










    • Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
      – Dan Snyder
      Jan 31 '14 at 13:10

















    up vote
    0
    down vote













    Maybe you enabled the time synchronisation between host and guests?



    See here:
    Using virtual box is it possible to set your virtual machine time to be different from host time



    Just a thought.



    I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).






    share|improve this answer























    • You will be able to add comments to any post after gaining 50 points to reputation.
      – pabouk
      Jan 31 '14 at 9:07










    • Ok, thanks for the clarification on that!
      – Marlon
      Jan 31 '14 at 11:17










    • Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
      – Dan Snyder
      Jan 31 '14 at 12:14












    • Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
      – Dan Snyder
      Jan 31 '14 at 12:21










    • Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
      – Dan Snyder
      Jan 31 '14 at 13:10















    up vote
    0
    down vote










    up vote
    0
    down vote









    Maybe you enabled the time synchronisation between host and guests?



    See here:
    Using virtual box is it possible to set your virtual machine time to be different from host time



    Just a thought.



    I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).






    share|improve this answer














    Maybe you enabled the time synchronisation between host and guests?



    See here:
    Using virtual box is it possible to set your virtual machine time to be different from host time



    Just a thought.



    I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 20 '17 at 10:04









    Community

    1




    1










    answered Jan 31 '14 at 8:36









    Marlon

    1




    1












    • You will be able to add comments to any post after gaining 50 points to reputation.
      – pabouk
      Jan 31 '14 at 9:07










    • Ok, thanks for the clarification on that!
      – Marlon
      Jan 31 '14 at 11:17










    • Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
      – Dan Snyder
      Jan 31 '14 at 12:14












    • Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
      – Dan Snyder
      Jan 31 '14 at 12:21










    • Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
      – Dan Snyder
      Jan 31 '14 at 13:10




















    • You will be able to add comments to any post after gaining 50 points to reputation.
      – pabouk
      Jan 31 '14 at 9:07










    • Ok, thanks for the clarification on that!
      – Marlon
      Jan 31 '14 at 11:17










    • Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
      – Dan Snyder
      Jan 31 '14 at 12:14












    • Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
      – Dan Snyder
      Jan 31 '14 at 12:21










    • Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
      – Dan Snyder
      Jan 31 '14 at 13:10


















    You will be able to add comments to any post after gaining 50 points to reputation.
    – pabouk
    Jan 31 '14 at 9:07




    You will be able to add comments to any post after gaining 50 points to reputation.
    – pabouk
    Jan 31 '14 at 9:07












    Ok, thanks for the clarification on that!
    – Marlon
    Jan 31 '14 at 11:17




    Ok, thanks for the clarification on that!
    – Marlon
    Jan 31 '14 at 11:17












    Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
    – Dan Snyder
    Jan 31 '14 at 12:14






    Interesting. So I followed these: stevenormrod.com/2012/10/disabling-time-sync-in-virtualbox directions and I am able to set the time but this in the "Time and Date Settings" window still reverts back to the original time. The time on my toolbar changes to my specified time after a long while and then changes back as well. I tried the command specified above as well as the standard sudo date --set="..". Any other possibilities?
    – Dan Snyder
    Jan 31 '14 at 12:14














    Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
    – Dan Snyder
    Jan 31 '14 at 12:21




    Okay, so I tried this on a non-virtual Lubuntu installation and time setting works fine. All signs point to VB...
    – Dan Snyder
    Jan 31 '14 at 12:21












    Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
    – Dan Snyder
    Jan 31 '14 at 13:10






    Okay, VM with no guest additions allows time setting just fine. Perhaps a mechanism other than time synchronization is fighting me...
    – Dan Snyder
    Jan 31 '14 at 13:10














    up vote
    0
    down vote













    Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:



    disable time sync instructions



    Simply change line



    daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null



    in "/etc/init.d/vboxadd-service"



    Cheers






    share|improve this answer

























      up vote
      0
      down vote













      Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:



      disable time sync instructions



      Simply change line



      daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null



      in "/etc/init.d/vboxadd-service"



      Cheers






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:



        disable time sync instructions



        Simply change line



        daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null



        in "/etc/init.d/vboxadd-service"



        Cheers






        share|improve this answer












        Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:



        disable time sync instructions



        Simply change line



        daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null



        in "/etc/init.d/vboxadd-service"



        Cheers







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 31 '14 at 14:10









        Dan Snyder

        10613




        10613






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f709502%2fsetting-time-in-lubuntu%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

            Terni

            A new problem with tex4ht and tikz

            Sun Ra