Bug 20197 - Missing rfc3339 in systempreference choices for dateformat
Summary: Missing rfc3339 in systempreference choices for dateformat
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Mark Tompsett
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 15:26 UTC by Mark Tompsett
Modified: 2023-12-28 20:42 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20197: RFC3339 missing from options (4.15 KB, patch)
2018-02-14 15:53 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20197: RFC3339 missing from options (4.43 KB, patch)
2018-05-28 02:38 UTC, Dilan Johnpullé
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tompsett 2018-02-14 15:26:03 UTC
Koha::DateUtils.pm has logic for rfc3339 in output_pref, but there is no way for the end user to get that value into the system preference.
Comment 1 Mark Tompsett 2018-02-14 15:53:40 UTC
Created attachment 71617 [details] [review]
Bug 20197: RFC3339 missing from options

The output_pref in Koha::DateUtils has rfc3339 logic, but
there is no way to set the system preference to rfc3339.
This adds that option.

TEST PLAN
----------
0) back up your DB if you wish.
1) apply this patch.
2) Run the following commands:
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- no rfc3339 listed.
3) Run the following commands:
    > quit
    $ updatedatabase
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- rfc3339 now listed.
4) Run the following commands:
    > quit
    $ reset_all
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- rfc3339 still listed.
5) Log into the staff client
6) Home -> Administration -> Global System Preferences -> i18n/l10n
   -- rfc3339 should be listed in the dateformat syspref drop-down.
7) run koha qa test tools
8) restore DB if needed
Comment 2 Dilan Johnpullé 2018-05-28 02:38:11 UTC
Created attachment 75577 [details] [review]
Bug 20197: RFC3339 missing from options

The output_pref in Koha::DateUtils has rfc3339 logic, but
there is no way to set the system preference to rfc3339.
This adds that option.

TEST PLAN
----------
0) back up your DB if you wish.
1) apply this patch.
2) Run the following commands:
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- no rfc3339 listed.
3) Run the following commands:
    > quit
    $ updatedatabase
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- rfc3339 now listed.
4) Run the following commands:
    > quit
    $ reset_all
    $ mysql -u koha_kohadev -p
    > use koha_kohadev;
    > SELECT options FROM systempreferences WHERE variable='dateformat';
    -- rfc3339 still listed.
5) Log into the staff client
6) Home -> Administration -> Global System Preferences -> i18n/l10n
   -- rfc3339 should be listed in the dateformat syspref drop-down.
7) run koha qa test tools
8) restore DB if needed

Followed test plan and everything checks out. Syspref appears as another yyy-mm-dd entry though.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Comment 3 Jonathan Druart 2018-05-30 16:33:27 UTC
I still do not see the point of adding it.

http://irc.koha-community.org/koha/2018-02-14#i_2011298

17:30 	mtompset 	BTW, easy sign off: bug 20197
17:30 	huginn` 	Bug http://bugs.koha-community.org[…]_bug.cgi?id=20197 trivial, P5 - low, ---, mtompset, Needs Signoff , Missing rfc3339 in systempreference choices for dateformat
17:31 	Joubu 	It's not missing
17:32 		we do not want it
17:32 		do you want it?
17:34 	mtompset 	Why don't we want?
17:35 		DonnaB joined #koha
17:35 	mtompset 	No, I don't believe I would use it, but if the API uses it, why not let the user set things to see what the API sees?
17:37 		andrewfh joined #koha
17:38 	Joubu 	because it's only used by the api to format date for JSON
17:39 	tcohen 	mtompset: if you are curious about it, better look at the RFC :-P
17:40 	Joubu 	mtompset: you should also keep in mind that we do not want to add stuffs that nobody asked for :)
17:41 		it will adds code to maintain for nothing
17:42 	paxed 	mtompset: also see date-format.inc
17:43 		although it doesn't explicitly need change, ...
Comment 4 David Cook 2022-12-06 05:26:31 UTC
Closing due to age and doesn't seem to be needed/wanted