← Back to team overview

touch-packages team mailing list archive

[Bug 1526264] [NEW] ntpdate fails with invalid argument when device is set to a date in the future

 

Public bug reported:

current build number: 204
device name: krillin
channel: ubuntu-touch/rc-proposed/bq-aquaris.en

when the current date of the device is in the future, ntpdate fails with
'Invalid Argument'

For example:

* current date: passed
root@ubuntu-phablet:~# date
mardi 15 décembre 2015, 12:01:22 (UTC+0100)
root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
15 Dec 12:01:38 ntpdate[4360]: adjust time server 91.189.94.4 offset 0.000150 sec

* Date in the past: passed
root@ubuntu-phablet:~# date -s '2015-12-14 13:00:00'
lundi 14 décembre 2015, 13:00:00 (UTC+0100)
root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
15 Dec 12:03:02 ntpdate[5008]: step time server 91.189.89.199 offset 82943.900852 sec

* Date in the future: Failed
root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
16 Dec 13:00:10 ntpdate[4820]: Can't adjust the time of day: Invalid argument

= Workaround =
Use option -b 

root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
root@ubuntu-phablet:~# ntpdate -b ntp.ubuntu.com
15 Dec 12:07:08 ntpdate[7083]: step time server 91.189.94.4 offset -89602.883248 sec

** Affects: canonical-devices-system-image
     Importance: High
         Status: New

** Affects: ntp (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: ntp (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: canonical-devices-system-image
   Importance: Undecided => High

** Description changed:

  current build number: 204
  device name: krillin
  channel: ubuntu-touch/rc-proposed/bq-aquaris.en
  
  when the current date of the device is in the future, ntpdate fails with
  'Invalid Argument'
  
  For example:
  
  * current date: passed
  root@ubuntu-phablet:~# date
  mardi 15 décembre 2015, 12:01:22 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  15 Dec 12:01:38 ntpdate[4360]: adjust time server 91.189.94.4 offset 0.000150 sec
  
  * Date in the past: passed
  root@ubuntu-phablet:~# date -s '2015-12-14 13:00:00'
  lundi 14 décembre 2015, 13:00:00 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  15 Dec 12:03:02 ntpdate[5008]: step time server 91.189.89.199 offset 82943.900852 sec
  
  * Date in the future: Failed
  root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
  mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  16 Dec 13:00:10 ntpdate[4820]: Can't adjust the time of day: Invalid argument
+ 
+ = Workaround =
+ Use option -b 
+ 
+ root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
+ mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
+ root@ubuntu-phablet:~# ntpdate -b ntp.ubuntu.com
+ 15 Dec 12:07:08 ntpdate[7083]: step time server 91.189.94.4 offset -89602.883248 sec

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1526264

Title:
  ntpdate fails with invalid argument when device is set to a date in
  the future

Status in Canonical System Image:
  New
Status in ntp package in Ubuntu:
  New

Bug description:
  current build number: 204
  device name: krillin
  channel: ubuntu-touch/rc-proposed/bq-aquaris.en

  when the current date of the device is in the future, ntpdate fails
  with 'Invalid Argument'

  For example:

  * current date: passed
  root@ubuntu-phablet:~# date
  mardi 15 décembre 2015, 12:01:22 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  15 Dec 12:01:38 ntpdate[4360]: adjust time server 91.189.94.4 offset 0.000150 sec

  * Date in the past: passed
  root@ubuntu-phablet:~# date -s '2015-12-14 13:00:00'
  lundi 14 décembre 2015, 13:00:00 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  15 Dec 12:03:02 ntpdate[5008]: step time server 91.189.89.199 offset 82943.900852 sec

  * Date in the future: Failed
  root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
  mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate ntp.ubuntu.com
  16 Dec 13:00:10 ntpdate[4820]: Can't adjust the time of day: Invalid argument

  = Workaround =
  Use option -b 

  root@ubuntu-phablet:~# date -s '2015-12-16 13:00:00'
  mercredi 16 décembre 2015, 13:00:00 (UTC+0100)
  root@ubuntu-phablet:~# ntpdate -b ntp.ubuntu.com
  15 Dec 12:07:08 ntpdate[7083]: step time server 91.189.94.4 offset -89602.883248 sec

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1526264/+subscriptions


Follow ups