Bug 15764 - KOCT timestamp timezone problem
Summary: KOCT timestamp timezone problem
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
: 8091 15748 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-09 11:34 UTC by Julian Maurice
Modified: 2017-06-14 22:14 UTC (History)
7 users (show)

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


Attachments
Bug 15764: Fix timestamp sent by KOCT (1.90 KB, patch)
2016-02-09 11:35 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15764: Fix timestamp sent by KOCT (2.09 KB, patch)
2016-02-10 00:11 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15764: Fix timestamp sent by KOCT (2.22 KB, patch)
2016-02-10 17:26 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 15764: Fix timestamp sent by KOCT (2.39 KB, patch)
2016-02-12 14:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2016-02-09 11:34:27 UTC
KOCT plugin send UTC timestamp, it should be converted to local timezone
Comment 1 Julian Maurice 2016-02-09 11:35:16 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-02-09 18:30:22 UTC
Had so much pain trying to get the KOCT to install and work in Firefox.
Had to use Snap4evr, or something like that, to get the toolbar to be visible. And I don't know why it didn't log things right off the bat, but that was not a fun experience trying to get it to log. Now it does, but I can't seem to get it to send. I bet it is a protocol issue (https vs http).

Also, you need to set that system preference too, right?
Any configuration suggestions? Because this eyeballs fine.
Comment 3 Katrin Fischer 2016-02-09 19:06:11 UTC
There is no configuration in Koha needed.
Make sure that you close/open the plugin after entering the parameters.
I have used it with Firefox ESR version a few days ago successfully with https://.
The user used for uploading needs permissions and you have to enter your full.
Comment 4 Mark Tompsett 2016-02-10 00:11:29 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2016-02-10 00:14:31 UTC
I pity people who actually use this regularly, because unless someone has broken their skull open to actually get it to work, it is an awful piece of software.
Comment 6 Jonathan Druart 2016-02-10 09:32:39 UTC
(In reply to M. Tompsett from comment #5)
> I pity people who actually use this regularly, because unless someone has
> broken their skull open to actually get it to work, it is an awful piece of
> software.

The developers will appreciate.
You can also open bug reports to help and improve it.
Comment 7 Katrin Fischer 2016-02-10 10:01:38 UTC
I disagree with Mark - it's an easy to use tool and so far I haven't experienced problems with it. 

It might depend on browser version and we will probably have to change the plugin at some point as I think Mozilla seems to plan changes there. there (XUL?).
Comment 8 Owen Leonard 2016-02-10 17:12:25 UTC
(In reply to M. Tompsett from comment #5)
> I pity people who actually use this regularly, because unless someone has
> broken their skull open to actually get it to work, it is an awful piece of
> software.

This comment isn't helpful and is profoundly disrespectful to those who have spent time working on it.
Comment 9 Owen Leonard 2016-02-10 17:12:42 UTC
*** Bug 15748 has been marked as a duplicate of this bug. ***
Comment 10 Owen Leonard 2016-02-10 17:26:50 UTC Comment hidden (obsolete)
Comment 11 Mark Tompsett 2016-02-10 19:06:12 UTC
PROBLEM! The desktop version does not do UTC.
Comment 12 Chris Cormack 2016-02-10 22:39:12 UTC
I'd like to see an apology from Mark for his comment in comment 5. That was a totally unacceptable way to act Mark.
Comment 13 Mark Tompsett 2016-02-10 22:53:58 UTC
(In reply to Chris Cormack from comment #12)
> I'd like to see an apology from Mark for his comment in comment 5. That was
> a totally unacceptable way to act Mark.

True. I apologize. My frustration is mine alone, and does not reflect the great efforts of users and developers alike or the experiences of others. And this is not an appropriate place for such an outburst, nor is such an outburst acceptable behaviour. Again, I'm sorry everyone.
Comment 14 Chris Cormack 2016-02-10 22:55:42 UTC
(In reply to M. Tompsett from comment #13)
> (In reply to Chris Cormack from comment #12)
> > I'd like to see an apology from Mark for his comment in comment 5. That was
> > a totally unacceptable way to act Mark.
> 
> True. I apologize. My frustration is mine alone, and does not reflect the
> great efforts of users and developers alike or the experiences of others.
> And this is not an appropriate place for such an outburst, nor is such an
> outburst acceptable behaviour. Again, I'm sorry everyone.

Thank you Mark.
Comment 15 Indranil Das Gupta 2016-02-10 23:48:25 UTC
(In reply to Katrin Fischer from comment #7)
> It might depend on browser version and we will probably have to change the
> plugin at some point as I think Mozilla seems to plan changes there. there
> (XUL?).

^^^^^^^^ W.R.T xul perhaps we should keep the following in mind as the future of KOCT

[1] http://arstechnica.com/information-technology/2015/08/mozilla-sets-plan-to-dump-firefox-add-ons-move-to-chrome-like-extensions/

[2] https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/
Comment 16 Julian Maurice 2016-02-11 08:28:40 UTC
(In reply to M. Tompsett from comment #11)
> PROBLEM! The desktop version does not do UTC.

Which versions of Firefox and KOCT do you use ?
Comment 17 Katrin Fischer 2016-02-11 08:29:37 UTC
Hi Julian, I think Mark was worried about keeping compatibility with Kyle's desktop offline circ client (linked from circ module start page).
Comment 18 Julian Maurice 2016-02-11 08:57:54 UTC
Oh, I wasn't aware of the desktop client...
Do you think we should change the desktop client to send UTC too ? Or change firefox plugin to send time in local timezone ?

I would go for changing the desktop client as the timezones for client and server can differ
Comment 19 Katrin Fischer 2016-02-11 09:02:24 UTC
I am not sure what makes the most sense - timezones are confusing.

Would there be an option to handle it inside of Koha like the patch does? Adding Kyle to this discussion for his opinion.
Comment 20 Mark Tompsett 2016-02-11 13:40:45 UTC
(In reply to Katrin Fischer from comment #17)
> Hi Julian, I think Mark was worried about keeping compatibility with Kyle's
> desktop offline circ client (linked from circ module start page).

Yes. However, after testing further, I see the routes of processing are not the same -- unless it is that pesky "Commit" route which I still can not for the life of me get working.

My transactions disappear into nothingness. And this nothingness void exists for other methods too attempting anything except a direct application. I may end up screen casting these failures to see if someone sees something I am doing wrong or forgot to configure.
Comment 21 Mark Tompsett 2016-02-11 13:51:31 UTC
(In reply to Katrin Fischer from comment #19)
> I am not sure what makes the most sense - timezones are confusing.

Indeed. I was looking at the KOTC plugin source (I think it is the source), and noticing that it used CURRENT_TIMESTAMP. Clearly that timestamp's timezone differs from the desktop version.

Thanks for the suggestion to read the manual. I figured out the three ways:

https://addons.mozilla.org/en-US/firefox/search/?q=koct (Firefox plugin)

https://github.com/bywatersolutions/koha-offline-circulation/releases (Desktop)

"If the AllowOfflineCirculation preference is set to 'Enable'..."
(http://translate.koha-community.org/manual/3.22/en/html-desktop/#offlinecirc)
makes an HTML interface to offline available under Circulation in the staff client.
Comment 22 Mark Tompsett 2016-02-11 13:53:22 UTC
(In reply to Julian Maurice from comment #18)
> Oh, I wasn't aware of the desktop client...

See comment #21 for a link. :)
Comment 23 Kyle M Hall (khall) 2016-02-12 14:42:56 UTC
Created attachment 47982 [details] [review]
Bug 15764: Fix timestamp sent by KOCT

KOCT plugin send UTC timestamp, it should be converted to local timezone

Test plan:
1. Install latest version of KOCT and configure it
   https://addons.mozilla.org/fr/firefox/addon/koct/
   https://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin
2. Use it to do a checkout and a checkin. See that timestamps are UTC.
3. Click on "Commit to Koha" under "Log" tab
4. Wait for all operations to be processed
5. In Koha, go to Circulation > Offline circulation and check the
   timestamps were correctly converted to the Koha server's timezone
6. Process the pending operations and see that timestamps are still
   correct
7. Repeat step 2
8. Now click on "Apply directly"
9. Check the timestamps are correct in Koha

NOTE: I could not get "Commit to Koha" to work for me, but I did
      confirm this corrected behaviour with "Apply directly".

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Using the "commit to Koha" option works fine for me.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch only affects service.pl, which is not used in any way by the
uploader for desktop client files. No changes to the desktop offline
circ will be needed.
Comment 24 Brendan Gallagher 2016-02-23 20:53:59 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks
Comment 25 Julian Maurice 2016-02-26 14:48:23 UTC
Patch pushed to 3.22.x, will be in 3.22.4
Comment 26 Katrin Fischer 2016-03-29 21:34:27 UTC
*** Bug 8091 has been marked as a duplicate of this bug. ***