[Bug 1910162] Re: jq fromdate is one hour off and hence FTBFS when local time is during daylight savings

Brian Murray 1910162 at bugs.launchpad.net
Tue Jan 12 22:52:04 UTC 2021


Hello Alex, or anyone else affected,

Accepted jq into focal-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/jq/1.6-1ubuntu0.20.04.1 in a few
hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
focal to verification-done-focal. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-focal. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: jq (Ubuntu Focal)
       Status: Triaged => Fix Committed

** Tags added: verification-needed-focal

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1910162

Title:
  jq fromdate is one hour off and hence FTBFS when local time is during
  daylight savings

Status in jq package in Ubuntu:
  Fix Released
Status in jq source package in Focal:
  Fix Committed
Status in jq source package in Groovy:
  Fix Committed
Status in jq source package in Hirsute:
  Fix Released
Status in jq package in Debian:
  Unknown

Bug description:
  [Impact]

   * An upstream change in version 1.6 turned out to break
     depending on the current timezone (that is how it went undetected
     for so long)

   * Upstream undid the change and we want to follow them by backporting 
     that.

  [Test Case]

   * root at h:~# TZ=America/New_York jq -n '"2018-08-31T00:00:00Z"|fromdate|todate'
  "2018-08-31T01:00:00Z"

  This should return the same time as it was passed.

  [Where problems could occur]

   * jq can do many things and handling date conversions is just a small 
     fraction of it. But in that fraction fromdate|todate and regressions 
     would happen to take place.
     And vice versa - if a jq user does not use those conversions it should 
     be a no-op for him.

     Another regression could be if users were aware and added workarounds 
     (like doing -1 after the conversion). Obviously by fixing this it would 
     then be -1 off afterwards.

  
  [Other Info]
   
   * n/a

  ---

  When trying to build jq locally it FTBFS for me since the unit tests
  that run during the build and check the output of fromdate fail:

  Testing 'fromdate' at line number 642
  *** Expected 1425599507, but got 1425603107 for test at line number 644: fromdate
  Testing 'strptime("%Y-%m-%dT%H:%M:%SZ")' at line number 646
  Testing 'strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' at line number 650
  *** Expected 1425599507, but got 1425603107 for test at line number 652: strptime("%Y-%m-%dT%H:%M:%SZ")|mktime

  This is caused by this upstream bug
  https://github.com/stedolan/jq/issues/2001 which was fixed by this
  upstream commit
  https://github.com/stedolan/jq/commit/3c5b1419a278dfb192666b33197dc182c670290d
  but this fix is not yet in 1.6-2 as shipped in Ubuntu.

  See attached for a debdiff which includes the upstream patch to
  resolve this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/jq/+bug/1910162/+subscriptions



More information about the Ubuntu-sponsors mailing list