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

Christian Ehrhardt  1910162 at bugs.launchpad.net
Tue Jan 5 06:12:27 UTC 2021


Thanks, also the testcase in the issue is pretty obvious and easy to
try.

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


This is broken in 1.6 and up and would be fixed by any new release og jq (but no release happened since Nov 2018).

** Changed in: jq (Ubuntu)
       Status: New => Confirmed

** Also affects: jq (Ubuntu Groovy)
   Importance: Undecided
       Status: New

** Also affects: jq (Ubuntu Hirsute)
   Importance: Undecided
       Status: Confirmed

** Also affects: jq (Ubuntu Focal)
   Importance: Undecided
       Status: New

-- 
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:
  Triaged
Status in jq source package in Focal:
  Triaged
Status in jq source package in Groovy:
  Triaged
Status in jq source package in Hirsute:
  Triaged

Bug description:
  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