Announcement

Collapse
No announcement yet.

Unable to set date/time

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to set date/time

    Hello..

    I am facing a weird problem.. am on 8.10 Kde 4.2

    i am unable to change the date and time in systemsettings -> Date&Time

    It gives 3 errors when i click on apply

    1) Unable to contact time server : . (the dot is not a typo.. its there in the msg)
    2) Can not set date
    3) Error setting new time zone

    How do i fix this?

    Thanks.

    #2
    Re: Unable to set date/time

    correcting the drift requires administration privileges (security).

    ntpdate as regular user
    Code:
    > ntpdate europe.pool.ntp.org
     4 Mar 11:12:35 ntpdate[32420]: bind() fails: Permission denied
    ntpdate as root (via sudo)
    Code:
    > sudo ntpdate europe.pool.ntp.org
     4 Mar 11:12:26 ntpdate[32407]: adjust time server 204.9.53.11 offset 0.003630 sec
    this is the issue you're seeing, i think, with the graphical front end in system settings.
    i (wild) guess this is something that is still not dealt with.
    it's there, but it simply doesn't work, yet.
    i'm not sure how kubuntu developers want to deal with this.
    on way (the old way) of doing this would be to add an entry in the root user's crontab.

    now...
    ttbmk the clock is adjusted at boot, when network connection is established.
    so, if you have a system (e.g. a laptop) that's rebooted often, this is sufficient (i.e. you don't need the system setting thing).
    if you have a system that is always on, though, it might be worth scheduling the automatic drift correction.

    here's the ubuntu community help on crontab.

    hth
    gnu/linux is not windoze

    Comment


      #3
      Re: Unable to set date/time

      Search is just great

      Just upgraded from 4.1 to 4.2 and had the same prob,

      Code:
      sudo ntpdate europe.pool.ntp.org
      solved it. Tnx jankushka
      In a world without walls and fences - who needs windows and gates?

      Comment


        #4
        Re: Unable to set date/time

        Code:
        >sudo ntpdate asia.pool.ntp.org
        Error : Name or service not known
         8 Mar 22:09:43 ntpdate[6110]: can't find host asia.pool.ntp.org
        
         8 Mar 22:09:43 ntpdate[6110]: no servers can be used, exiting

        that is the error i am getting..

        suppose i want to set the date and time (am/pm format) through command line and the time zone to gmt + 5h 30m , how do i do this ? the man pages of date is overwhelming for me.. i cant make sense of it

        Comment


          #5
          Re: Unable to set date/time

          Originally posted by terrordrone
          Code:
          >sudo ntpdate asia.pool.ntp.org
          Error : Name or service not known
           8 Mar 22:09:43 ntpdate[6110]: can't find host asia.pool.ntp.org
          
           8 Mar 22:09:43 ntpdate[6110]: no servers can be used, exiting
          that is the error i am getting..
          funny.
          it works no problems here.
          please try with the europe server (and/or with any other you find at www.pool.ntp.org).
          see if you get the same error message.
          if you do, then please post the result of
          Code:
          nslookup asia.pool.ntp.org
          Originally posted by terrordrone
          suppose i want to set the date and time (am/pm format) through command line and the time zone to gmt + 5h 30m , how do i do this ? the man pages of date is overwhelming for me.. i cant make sense of it
          before going into this, let us check the above.
          you must be able to correct the drift with ntpdate using any of the ntp servers at pool.ntp.org.
          if you can't, then you have a problem elsewhere that needs to be fixed before.

          cheers
          gnu/linux is not windoze

          Comment


            #6
            Re: Unable to set date/time

            Code:
            nslookup asia.pool.ntp.org
            Server:     217.1.84.89
            Address:    217.1.84.89#53
            
            Non-authoritative answer:
            *** Can't find asia.pool.ntp.org: No answer
            i am under a proxy.. its my office machine.. but i have set the proxy everywhere including $HTTP_PROXY

            Comment


              #7
              Re: Unable to set date/time

              ttbomk, ntp does not understand proxies.
              i guess ntp is out of the question in your case.
              if anyone knows more, please step in...

              in order to set the clock properly you should:
              a) reboot your box
              b) enter bios setup
              c) set date/time there

              then at your system's prompt
              Code:
              sudo dpkg-reconfigure tzdata
              pick the appropriate continent/city combination.
              this will copy your localtime/timezone data into the system's configuration files

              in order to set the time on your system, from command line (i shall use 3pm for this example)
              you can use the following
              Code:
              sudo date +%T --set "15:00:00"
              hth
              gnu/linux is not windoze

              Comment


                #8
                Re: Unable to set date/time

                Originally posted by jankushka
                ttbomk, ntp does not understand proxies.
                i guess ntp is out of the question in your case.
                if anyone knows more, please step in...

                in order to set the clock properly you should:
                a) reboot your box
                b) enter bios setup
                c) set date/time there

                then at your system's prompt
                Code:
                sudo dpkg-reconfigure tzdata
                pick the appropriate continent/city combination.
                this will copy your localtime/timezone data into the system's configuration files

                in order to set the time on your system, from command line (i shall use 3pm for this example)
                you can use the following
                Code:
                sudo date +%T --set "15:00:00"
                hth
                thanks mate.. it works

                Comment

                Working...
                X