[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2022-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Andrew Isherwood  changed:

   What|Removed |Added

 CC|bugzi...@warmlight.co.uk|

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2022-01-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Andrew Nugged  changed:

   What|Removed |Added

 Blocks||29906


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29906
[Bug 29906] When changing hold parameters over API (PUT) it forcibly gets to
"suspended" state
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Kyle M Hall  changed:

   What|Removed |Added

 Status|Pushed to master|RESOLVED
 Resolution|--- |FIXED

--- Comment #136 from Kyle M Hall  ---
Unit tests fail in 21.05.x, please rebase and ping me if this is needed for
21.05.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|additional_work_needed, |
   |rel_21_11_candidate |

--- Comment #135 from Jonathan Druart  ---
Last patches pushed to master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||29403


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29403
[Bug 29403] dt_from_string should fail if passed and rfc3339 formatted string
when 'iso' is selected as dateformat
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #134 from Martin Renvoize  ---
OK.. I've tested the follow-ups and agree that, although not perfect in the
wider scheme, they are what we should push for now.. as such I've signed off.

I have added two new bugs depending on this one however, to continue the work
to clarify and improve our date handling situation.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||29402


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29402
[Bug 29402] We should add a 'dateonly' switch option to dt_from_string
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #127240|0   |1
is obsolete||

--- Comment #133 from Martin Renvoize  ---
Created attachment 127244
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127244=edit
Bug 24850: Correctly handle suspended_until for PUT

if we are passing suspended_until to the body, it should be a rfc3339 (what the
spec is expecting)
but $hold->suspend_until will be iso

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #127239|0   |1
is obsolete||

--- Comment #132 from Martin Renvoize  ---
Created attachment 127243
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127243=edit
Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be -MM-DD, without fallback.

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #127236|0   |1
is obsolete||

--- Comment #131 from Martin Renvoize  ---
Created attachment 127242
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127242=edit
Bug 24850: suspended_until is a date-time

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #127235|0   |1
is obsolete||

--- Comment #130 from Martin Renvoize  ---
Created attachment 127241
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127241=edit
Bug 24850: Fix api/v1/holds.t

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #129 from Jonathan Druart  ---
Created attachment 127240
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127240=edit
Bug 24850: Correctly handle suspended_until for PUT

if we are passing suspended_until to the body, it should be a rfc3339 (what the
spec is expecting)
but $hold->suspend_until will be iso

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||29401


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29401
[Bug 29401] Hold suspensions should match the resolution of other holds date
fields
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #127232|0   |1
is obsolete||

--- Comment #128 from Jonathan Druart  ---
Created attachment 127239
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127239=edit
Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be -MM-DD, without fallback.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #127 from Jonathan Druart  ---
/suspension is expecting a date
other routes are expecting a datetime

That seems inconsistent and wrong. IMO we should open a separate bug report and
base the test fix on top of it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #126 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #125)
>  77 "suspended_until": {
>  78   "type": ["string", "null"],
>  79   "format": "date-time",
>  80   "description": "Date until which the hold has been suspended"
>  81 },
> 
> But the code is converting everything to date-only...
> 
> What do we want here?

The spec was written taking the DB structure into account. If you think the
spec is wrong and this field should be date-only, let's do it on a separate
bug?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #125 from Jonathan Druart  ---

 77 "suspended_until": {
 78   "type": ["string", "null"],
 79   "format": "date-time",
 80   "description": "Date until which the hold has been suspended"
 81 },

But the code is converting everything to date-only...

What do we want here?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #124 from Tomás Cohen Arazi  ---
Created attachment 127236
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127236=edit
Bug 24850: suspended_until is a date-time

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #123 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #119)
> But, for here.. I think passing 'iso' as the format explicitly for date only
> where Jonathans follow-up does seems like the most pragmatic solution in the
> time.. Adding a 'date-only' parameter should be in a desperate bug in my
> opinion.

I agree, what I meant to say is that passing an ISO full-date formatted date is
correct in the Swagger 2.0 spec, and we should better have explicit params. My
attempt yesterday night was to add something explicit:

$value = $dtf->format_datetime(dt_from_string($value, 'iso'))

but either works, as long as we document this conversation

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #122 from Jonathan Druart  ---
Read those 2 comments the other way around, there is still one test failing :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #121 from Jonathan Druart  ---
Created attachment 127235
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127235=edit
Bug 24850: Fix api/v1/holds.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #120 from Jonathan Druart  ---
There is still one test failing:

#   Failed test '404 Not Found'
#   at t/db_dependent/api/v1/holds.t line 220.
#  got: '400'
# expected: '404'

#   Failed test 'has value for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 220.

I don't understand it and it's a mess to debug (We definitely need to improve
our error handling when testing the REST API).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #119 from Martin Renvoize  ---
But, for here.. I think passing 'iso' as the format explicitly for date only
where Jonathans follow-up does seems like the most pragmatic solution in the
time.. Adding a 'date-only' parameter should be in a desperate bug in my
opinion.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #118 from Martin Renvoize  ---
But yes.. I did wonder if we should actually have a 'date only' parameter we
can pass so our iso fallback can explicitly ban time parts for this case.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #117 from Martin Renvoize  ---
https://stackoverflow.com/questions/522251/whats-the-difference-between-iso-8601-and-rfc-3339-date-formats

Highlighting the bit that raised my thoughts: `Most notably RFC 3339 specifies
a complete representation of date and time (only fractional seconds are
optional)`

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #116 from Martin Renvoize  ---
I actually read it the other way around.. RFC3339 is full date-time specific
and is a subspec of ISO8609 which is looser and allows for date only.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #115 from Tomás Cohen Arazi  ---
Date-only is part of RFC 3339. It is the full-date spec which matches ISO 8601
[1]

Maybe we need a dateonly param so things are clear?

[1] https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #127231|0   |1
is obsolete||

--- Comment #114 from Jonathan Druart  ---
Created attachment 127232
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127232=edit
Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be -MM-DD, without fallback.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #113 from Jonathan Druart  ---
Created attachment 127231
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127231=edit
Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be -MM-DD, without fallback.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #112 from Tomás Cohen Arazi  ---
That's what we're getting.

The given date (2021-11-02) does not match the date format (rfc3339)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #111 from Tomás Cohen Arazi  ---
This commit broke all the things:

398f7b45f074b023b03e5075821f0abb08cda66c

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #110 from Jonathan Druart  ---
We could assume that 'date' won't be rfc3339, but I am not sure it's correct.
The following patches seem to fix the tests.

diff --git a/Koha/Object.pm b/Koha/Object.pm
index 5d0f3f720ff..ec1316c45d7 100644
--- a/Koha/Object.pm
+++ b/Koha/Object.pm
@@ -751,7 +751,7 @@ sub attributes_from_api {
 elsif ( _date_or_datetime_column_type(
$columns_info->{$koha_field_name}->{data_type} ) ) {
 try {
 if ( $columns_info->{$koha_field_name}->{data_type} eq 'date'
) {
-$value = $dtf->format_date(dt_from_string($value,
'rfc3339'))
+$value = $dtf->format_date(dt_from_string($value))
 if defined $value;
 }
 else {

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #109 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #108)
> And many more actually, see the last builds

So for Object.t it's failing on date_or_birth because of:
The given date (2019-12-27) does not match the date format (rfc3339) at
/kohadevbox/koha/Koha/DateUtils.pm line 193.

We lost the fallback, certainly caused by 'Bug 24850: Don't fallback when
date_format is passed'

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #108 from Jonathan Druart  ---
And many more actually, see the last builds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||additional_work_needed

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #107 from Jonathan Druart  ---
There is a test failing because of this:

t/db_dependent/Koha/Object.t .. 9/21 # No tests run!

#   Failed test 'No tests run for subtest "date and date-time handling
tests"'
#   at t/db_dependent/Koha/Object.t line 649.
# Looks like you planned 2 tests but ran 1.
# Looks like you failed 1 test of 1 run.

#   Failed test 'attributes_from_api() tests'
#   at t/db_dependent/Koha/Object.t line 669.
[A bad parameter was given]# Looks like your test exited with 255 just after
14.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #106 from Jonathan Druart  ---
Pushed to master for 21.11, thanks to everybody involved!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||21.11.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |martin.renvoize@ptfs-europe
   |ity.org |.com

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

   Keywords||rel_21_11_candidate

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

   Keywords|release-notes-needed,   |
   |rel_21_11_candidate |

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

  Text to go in the||Prior to this patch our
  release notes||date handling library
   ||ignored offset data passed
   ||with rfc3339 dates. This
   ||could lead to problems if
   ||an API client converted to
   ||UTC or was in a different
   ||timezone to the Koha
   ||instance time setting.
   ||
   ||This patch adds proper
   ||handling to dt_from_string
   ||such that if an REF3339
   ||date is input, we parse out
   ||the offset and then adjust
   ||the time to match the
   ||instance timezone for
   ||storage.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #105 from Martin Renvoize  ---
(In reply to Jonathan Druart from comment #104)
> (In reply to Jonathan Druart from comment #103)
> > I haven't tried what's happening if no TZ is passed. Do we reject it,
> > assuming it's instance tz or UTC?
> 
> It's mandatory. However this is weird:
> 
> "due_date": "2021-10-27 23:59",
> => "Does not match date-time"
> 
> "due_date": "2021-10-27 23:59:00",
> => "Missing property."

Added as bug 29322.. I think it's tied up inside JSON::Validator.. I'll ask
Tomas to take a look.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=29322

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #104 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #103)
> I haven't tried what's happening if no TZ is passed. Do we reject it,
> assuming it's instance tz or UTC?

It's mandatory. However this is weird:

"due_date": "2021-10-27 23:59",
=> "Does not match date-time"

"due_date": "2021-10-27 23:59:00",
=> "Missing property."

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #103 from Jonathan Druart  ---
I haven't tried what's happening if no TZ is passed. Do we reject it, assuming
it's instance tz or UTC?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||release-notes-needed

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

 Status|In Discussion   |Passed QA

--- Comment #102 from Jonathan Druart  ---
Tested on top of bug 24609.

This script:
"""
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Patrons;
use C4::Context;
use C4::Circulation qw(AddIssue );
use t::lib::Mocks;
t::lib::Mocks::mock_config('America/Cordoba');
my $dbh = C4::Context->dbh;
my $patron = Koha::Patron->new({userid => 'xxx', categorycode => 'S',
branchcode => 'CPL'})->store;
t::lib::Mocks::mock_userenv({patron => $patron});
my $item = Koha::Items->find(1);
my $today = dt_from_string;
say "NOW: " . $today. " : " . $today->time_zone_short_name;
my $issue = AddIssue($patron->unblessed, $item->barcode);
my $date_due = $issue->date_due;
say "OBJECT:" . $date_due;
say "UI:" . output_pref({str => $date_due});
say "ID: " . $issue->id;
"""

Creates an checkout and outputs:
NOW: 2021-10-22T10:46:15 : -03
OBJECT:2021-10-27 23:59:00
UI:10/27/2021 23:59
ID: 4

GET http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
=> "due_date": "2021-10-27T23:59:00-03:00",

PUT http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
{
"due_date": "2021-10-27T23:59:00-03:00",
"issuer_id": null,
"note_seen": false,
"patron_id": 179,
"unseen_renewals": 0
}
GET http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
=> "due_date": "2021-10-27T23:59:00-03:00",

PUT http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
{
"due_date": "2021-10-27T20:59:00-06:00",
"issuer_id": null,
"note_seen": false,
"patron_id": 179,
"unseen_renewals": 0
}
GET http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
=> "due_date": "2021-10-27T23:59:00-03:00",

PUT http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
{
"due_date": "2021-10-27T23:59:00-06:00",
"issuer_id": null,
"note_seen": false,
"patron_id": 179,
"unseen_renewals": 0
}
GET http://kohadev-intra.mydnsname.org:8081/api/v1/checkouts/4
=> "due_date": "2021-10-28T02:59:00-03:00",

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #101 from Martin Renvoize  ---
API's that deal with dates in any way are fundamentally broken without the
patches here.. so I will be failing anything that touches dates in API's until
this has been looked at.

I personally don't have the mental capacity to go down this road for another
time so am stepping away. Someone else will have to take this one.

Burnt out...

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Katrin Fischer  changed:

   What|Removed |Added

 Status|BLOCKED |In Discussion

--- Comment #100 from Katrin Fischer  ---
Deciding on "in Discussion" as we concluded that those brains/hands/eyes need
to meet up to discuss the path forward with timezone handling first.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #99 from Katrin Fischer  ---
Ok, so we need some more eyes/typing hands/Perl brains on this one. 

Joubu, could you clarify maybe the points that need attention before inclusion?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Status|Passed QA   |BLOCKED

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

   Assignee|martin.renvoize@ptfs-europe |koha-b...@lists.koha-commun
   |.com|ity.org

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Status|ASSIGNED|Passed QA

--- Comment #98 from Martin Renvoize  ---
I have nothing to add here..   This bug is a massive blocker for any API bugs
that deal with dates.. to me the tests are as clear as I can make them and I
don't trust myself to re-write them all.. that's kinda the point of tests.. to
prevent regressions.. re-writing them all at this point would be asking for
regressions.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||28377


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28377
[Bug 28377] Use the API to suspend/resume holds
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #97 from Jonathan Druart  ---
(In reply to Tomás Cohen Arazi from comment #96)
> What is the status of this bug? I find the change pretty simple and the
> tests are clear as well. I see sign offs from a bunch of people as well. I
> tested it too, but not sure what is the real status.

See comments 85-87

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #96 from Tomás Cohen Arazi  ---
What is the status of this bug? I find the change pretty simple and the tests
are clear as well. I see sign offs from a bunch of people as well. I tested it
too, but not sure what is the real status.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116511|0   |1
is obsolete||

--- Comment #95 from Martin Renvoize  ---
Created attachment 126189
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126189=edit
Bug 24850: (follow-up) Add tests for invalid RFC3339 dates

Make this failure explicit, otherwise we get a "bad plan" failure.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116361|0   |1
is obsolete||

--- Comment #94 from Martin Renvoize  ---
Created attachment 126188
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126188=edit
Bug 24850: (QA follow-up) Add more comments

To try and clarify the logic here I've added an addition comment to the
code.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116360|0   |1
is obsolete||

--- Comment #93 from Martin Renvoize  ---
Created attachment 126187
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126187=edit
Bug 24850: Continue to handle default time and daylight saving

This patch prevents the call to set_time_zone if we are handling a
dateonly datetime string or a DST time

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116359|0   |1
is obsolete||

--- Comment #92 from Martin Renvoize  ---
Created attachment 126186
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126186=edit
Bug 24850: Always return 'instance' local time

This patch adds handling to ensure we always convert a passed in time to
the instance configured timezone..

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116358|0   |1
is obsolete||

--- Comment #91 from Martin Renvoize  ---
Created attachment 126185
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126185=edit
Bug 24850: Don't fallback when date_format is passed

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116357|0   |1
is obsolete||

--- Comment #90 from Martin Renvoize  ---
Created attachment 126184
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126184=edit
Bug 24850: Add tests for invalid RFC3339 dates

We should die on invalidly formatted dates being passed.  This patch
adds such a test case.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116356|0   |1
is obsolete||

--- Comment #89 from Martin Renvoize  ---
Created attachment 126183
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126183=edit
Bug 24850: Correct offset handling in dt_from_string

This patch adds correct handling for when an offset is passed within an
RFC3339 formatted datetime.

Test plan
1/ Run the DateUtils test and varify it now passes.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #116355|0   |1
is obsolete||

--- Comment #88 from Martin Renvoize  ---
Created attachment 126182
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126182=edit
Bug 24850: Correct tests for offset handling in RFC3339 dates

The tests were incorrectly passing for RFC3339 dates passed with an
offset.  This patch corrects the test.

Test plan:
1/ Read the change
2/ Agree the change adheres to the RFC
3/ Run the test and varify it now fails
3/ Signoff

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|rel_21_05_candidate |rel_21_11_candidate

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #87 from Martin Renvoize  ---
(In reply to David Cook from comment #72)
> I think something I find challenging about this patch set is that it makes a
> number of changes beyond including support for the timezone offset.
> 
> I think it might be easier to get this through if it were broken up into
> different bugzilla issues. For instance:
> 
> 1. Correct tests for offset handling in RFC3339 dates
> 2. Don't fallback when date_format is passed
> 3. Correct offset handling in dt_from_string
> 4. Always return 'instance' local time
> 
> Honestly, the number of different changes just makes me less confident that
> I'm thoroughly testing everything and that makes me uncomfortable QAing this
> one.

Whilst I agree.. I think that's how I started but found that half the tests
failed if I didn't follow through in one step.

So much time has passed since I first wrote these patches that I must admit I'm
struggling to unpick them myself :(.

I'm going to take a look at refactoring the tests to get my head around what
each test is actually testing.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Martin Renvoize  changed:

   What|Removed |Added

 Status|Passed QA   |ASSIGNED

--- Comment #86 from Martin Renvoize  ---
Sorry chaps, I'll swing back around to this tomorrow.. been a bit bogged down
the past few days

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #85 from Jonathan Druart  
---
I think this line is not tested:

229 $dt->set_time_zone($server_tz) unless ( $date_only || $floating );

And cannot we remove $floating and compare something like $dt->time_zone eq
'floating'?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #84 from Jonathan Druart  
---
Created attachment 116511
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116511=edit
Bug 24850: (follow-up) Add tests for invalid RFC3339 dates

Make this failure explicit, otherwise we get a "bad plan" failure.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #83 from Jonathan Druart  
---
(In reply to Marcel de Rooy from comment #79)
> Created attachment 116358 [details] [review]
> Bug 24850: Don't fallback when date_format is passed

I was trying to understand where this $do_fallback was tested. I removed it to
the following line:

+} elsif ( $do_fallback && $date_string =~ $fallback_re ) {

but the test is not failing explicitly:
  t/DateUtils.t .. 1/80 # Looks like you planned 80 tests but ran 79.


Can you highlight this use case in the tests please?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116305|0   |1
is obsolete||

--- Comment #82 from Marcel de Rooy  ---
Created attachment 116361
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116361=edit
Bug 24850: (QA follow-up) Add more comments

To try and clarify the logic here I've added an addition comment to the
code.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116304|0   |1
is obsolete||

--- Comment #81 from Marcel de Rooy  ---
Created attachment 116360
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116360=edit
Bug 24850: Continue to handle default time and daylight saving

This patch prevents the call to set_time_zone if we are handling a
dateonly datetime string or a DST time

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116302|0   |1
is obsolete||

--- Comment #79 from Marcel de Rooy  ---
Created attachment 116358
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116358=edit
Bug 24850: Don't fallback when date_format is passed

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116303|0   |1
is obsolete||

--- Comment #80 from Marcel de Rooy  ---
Created attachment 116359
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116359=edit
Bug 24850: Always return 'instance' local time

This patch adds handling to ensure we always convert a passed in time to
the instance configured timezone..

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116301|0   |1
is obsolete||

--- Comment #78 from Marcel de Rooy  ---
Created attachment 116357
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116357=edit
Bug 24850: Add tests for invalid RFC3339 dates

We should die on invalidly formatted dates being passed.  This patch
adds such a test case.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116300|0   |1
is obsolete||

--- Comment #77 from Marcel de Rooy  ---
Created attachment 116356
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116356=edit
Bug 24850: Correct offset handling in dt_from_string

This patch adds correct handling for when an offset is passed within an
RFC3339 formatted datetime.

Test plan
1/ Run the DateUtils test and varify it now passes.

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #116299|0   |1
is obsolete||

--- Comment #76 from Marcel de Rooy  ---
Created attachment 116355
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116355=edit
Bug 24850: Correct tests for offset handling in RFC3339 dates

The tests were incorrectly passing for RFC3339 dates passed with an
offset.  This patch corrects the test.

Test plan:
1/ Read the change
2/ Agree the change adheres to the RFC
3/ Run the test and varify it now fails
3/ Signoff

Signed-off-by: David Cook 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|BLOCKED |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #75 from Marcel de Rooy  ---
(In reply to Marcel de Rooy from comment #74)
> From the RFC:
>time-second = 2DIGIT  ; 00-58, 00-59, 00-60 based on leap second
>  ; rules
> 
> And the code:
> +   
> (\.\d{1,3})?(([Zz])|((?[\+|\-])(?[01][0-9]|2[0-3]):
> (?[0-5][0-9])))
> 
> No blocker, just noting

No, thats fine. Looking at seconds..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #74 from Marcel de Rooy  ---
From the RFC:
   time-second = 2DIGIT  ; 00-58, 00-59, 00-60 based on leap second
 ; rules

And the code:
+   
(\.\d{1,3})?(([Zz])|((?[\+|\-])(?[01][0-9]|2[0-3]):(?[0-5][0-9])))

No blocker, just noting

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |BLOCKED

--- Comment #73 from Marcel de Rooy  ---
QA: Looking here

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #72 from David Cook  ---
I think something I find challenging about this patch set is that it makes a
number of changes beyond including support for the timezone offset.

I think it might be easier to get this through if it were broken up into
different bugzilla issues. For instance:

1. Correct tests for offset handling in RFC3339 dates
2. Don't fallback when date_format is passed
3. Correct offset handling in dt_from_string
4. Always return 'instance' local time

Honestly, the number of different changes just makes me less confident that I'm
thoroughly testing everything and that makes me uncomfortable QAing this one.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #71 from David Cook  ---
Comment on attachment 115854
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115854
Bug 24850: Don't fallback when date_format is passed

Review of attachment 115854:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=24850=115854)
-

::: Koha/DateUtils.pm
@@ +146,4 @@
>  )?
>  )?
>  |xms;
> +$regex .= $time_re unless ( $date_format eq 'rfc3339' );

Should this be when $date_format eq 'rfc3339' or any time $date_format is
passed?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115857|0   |1
is obsolete||

--- Comment #70 from David Cook  ---
Created attachment 116305
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116305=edit
Bug 24850: (QA follow-up) Add more comments

To try and clarify the logic here I've added an addition comment to the
code.

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115856|0   |1
is obsolete||

--- Comment #69 from David Cook  ---
Created attachment 116304
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116304=edit
Bug 24850: Continue to handle default time and daylight saving

This patch prevents the call to set_time_zone if we are handling a
dateonly datetime string or a DST time

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115855|0   |1
is obsolete||

--- Comment #68 from David Cook  ---
Created attachment 116303
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116303=edit
Bug 24850: Always return 'instance' local time

This patch adds handling to ensure we always convert a passed in time to
the instance configured timezone..

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115854|0   |1
is obsolete||

--- Comment #67 from David Cook  ---
Created attachment 116302
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116302=edit
Bug 24850: Don't fallback when date_format is passed

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115853|0   |1
is obsolete||

--- Comment #66 from David Cook  ---
Created attachment 116301
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116301=edit
Bug 24850: Add tests for invalid RFC3339 dates

We should die on invalidly formatted dates being passed.  This patch
adds such a test case.

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115852|0   |1
is obsolete||

--- Comment #65 from David Cook  ---
Created attachment 116300
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116300=edit
Bug 24850: Correct offset handling in dt_from_string

This patch adds correct handling for when an offset is passed within an
RFC3339 formatted datetime.

Test plan
1/ Run the DateUtils test and varify it now passes.

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

David Cook  changed:

   What|Removed |Added

 Attachment #115851|0   |1
is obsolete||

--- Comment #64 from David Cook  ---
Created attachment 116299
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116299=edit
Bug 24850: Correct tests for offset handling in RFC3339 dates

The tests were incorrectly passing for RFC3339 dates passed with an
offset.  This patch corrects the test.

Test plan:
1/ Read the change
2/ Agree the change adheres to the RFC
3/ Run the test and varify it now fails
3/ Signoff

Signed-off-by: David Cook 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #63 from David Cook  ---
Honestly I really dislike dt_from_string. At some point, it should probably
have its internals refactored into a number of more specific private
sub-functions. But that change is outside the scope of this change.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #62 from David Cook  ---
I actually don't have the brainpower to QA this one today, but since it's
marked as "Needs Signoff", I can at least do that. 

My test plan:
0) Use koha-testing-docker
1) prove t/DateUtils.t
2) Noted "All tests successful."

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #61 from David Cook  ---
Comment on attachment 115852
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115852
Bug 24850: Correct offset handling in dt_from_string

Review of attachment 115852:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=24850=115852)
-

::: Koha/DateUtils.pm
@@ +160,5 @@
>  second => $+{second},
>  );
>  $ampm = $+{ampm};
> +if ( $+{offset} ) {
> +$tz = DateTime::TimeZone->new( name => $+{offset} . $+{hours} . 
> $+{minutes} );

You might want to call them offset_hours and offset_minutes, because they're so
close to "hour" and "minute" that I had to do a double-take to make sure they
were right.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #60 from David Cook  ---
Comment on attachment 115855
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115855
Bug 24850: Always return 'instance' local time

Review of attachment 115855:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=24850=115855)
-

::: Koha/DateUtils.pm
@@ +54,5 @@
>  return if $date_string and $date_string =~ m|^-0|;
>  
>  my $do_fallback = defined($date_format) ? 0 : 1;
> +my $server_tz = C4::Context->tz;
> +$tz = C4::Context->tz unless $tz;

This might read easier if it said the following:

$tz = $server_tz unless $tz;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-01-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #59 from David Cook  ---
(In reply to Martin Renvoize from comment #58)
> Mmmm, I've often wondered that... history.. Though I note that lib seems to
> have had a bunch of fixes recently.. so it wasn't perfect.. might be better
> now.

I think in the past we were using a different library. It was
DateTime::Format::DateParse which is super old and unmaintained.
DateTime::Format::Strptime, on the other hand, is well maintained. I have an
application that deals a lot with time and I love DateTime::Format::Strptime
for it heh.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-01-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #58 from Martin Renvoize  ---
(In reply to David Cook from comment #55)
> I'm still curious why we don't use DateTime::Format::Strptime (from the
> author of DateTime).
> 
> That said, it doesn't allow for optional parts of patterns, so you have to
> do a few tests from more specific to less specific.

Mmmm, I've often wondered that... history.. Though I note that lib seems to
have had a bunch of fixes recently.. so it wasn't perfect.. might be better
now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-01-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #57 from Martin Renvoize  ---
From memory, I think you are right that the Z should always be capitalised..
but I think I read somewhere that most libraries are lenient with the case so I
adopted that approach..  Happy to switch it out of course.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes

2021-01-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850

--- Comment #56 from David Cook  ---
Comment on attachment 115852
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115852
Bug 24850: Correct offset handling in dt_from_string

Review of attachment 115852:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=24850=115852)
-

::: Koha/DateUtils.pm
@@ +117,4 @@
>  (?\d{2})
>  :
>  (?\d{2})
> +
> (\.\d{1,3})?(([Zz])|((?[\+|\-])(?[01][0-9]|2[0-3]):(?[0-5][0-9])))

I don't think lowercase "z" is valid here?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   >