[Bug 19222] New: Why does dt_from_string not understand yyyy-mm-ddThh:mm: ss ?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Bug ID: 19222 Summary: Why does dt_from_string not understand yyyy-mm-ddThh:mm:ss ? Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org dt_from_string disregards the time part when there is a T before it. But note that if you print a datetime it actually prints that T. Like: 2017-08-31T13:32:37 A small regex adjustment could be helpful. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 66669 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66669&action=edit Bug 19222: Why does dt_from_string not understand yyyy-mm-ddThh:mm:ss? dt_from_string disregards the time part when there is a T before it. But note that if you print a datetime it actually prints that T. Like: 2017-08-31T13:32:37 A small regex adjustment could be helpful. Test plan: Run t/DateUtils.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Use case: I get values like 2017-08-31T13:32:37 from outside xml and want to call dt_from_string on them when importing in a plugin. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66669|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 66968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66968&action=edit Bug 19222: Why does dt_from_string not understand yyyy-mm-ddThh:mm:ss? dt_from_string disregards the time part when there is a T before it. But note that if you print a datetime it actually prints that T. Like: 2017-08-31T13:32:37 A small regex adjustment could be helpful. Test plan: Run t/DateUtils.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- I suppose my pondering over [Z\+-]\d{2}:?\d{2} or something similar for the timezone offset is best saved for another bug, right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #4)
I suppose my pondering over [Z\+-]\d{2}:?\d{2} or something similar for the timezone offset is best saved for another bug, right?
Thx for signing off. Yeah, open a new report :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66968|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68601 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68601&action=edit Bug 19222: Why does dt_from_string not understand yyyy-mm-ddThh:mm:ss? dt_from_string disregards the time part when there is a T before it. But note that if you print a datetime it actually prints that T. Like: 2017-08-31T13:32:37 A small regex adjustment could be helpful. Test plan: Run t/DateUtils.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I discuss this with somebody already, but cannot find the logs. I do not think we should support this new format, it is the string representation of a DateTime object. If we support it that could lead to hidden bugs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19222 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |LATER --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Some time far away -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org