Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp does not work #2403

Closed
mlep opened this issue Dec 19, 2016 · 11 comments
Closed

Timestamp does not work #2403

mlep opened this issue Dec 19, 2016 · 11 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui
Milestone

Comments

@mlep
Copy link
Contributor

mlep commented Dec 19, 2016

JabRef 3.8, but also JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

The timestamp features does not work well:

  • a click on Today raises an exception (see below)
  • a click on Clear does not clear the field content
  • a double-click in the field sets the timestamp value to the current date (i.e. today). Is it the intended behavior?
15:10:15.023 [AWT-EventQueue-0] INFO  net.sf.jabref.logic.importer.OpenDatabase - Opening: /home/user/Documents/Biblio/biblio.bib
15:10:15.964 [AWT-EventQueue-0] INFO  net.sf.jabref.logic.importer.OpenDatabase - Opening: /home/user/Documents/Biblio/user.bib
15:11:06.100 [AWT-EventQueue-0] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
java.time.DateTimeException: Unable to obtain ZonedDateTime from TemporalAccessor: 2016-12-19 of type java.time.LocalDate
	at java.time.ZonedDateTime.from(ZonedDateTime.java:565) ~[?:1.8.0_66]
	at net.sf.jabref.gui.date.DatePickerButton.dateChanged(DatePickerButton.java:57) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.DatePicker.zInternalSetLastValidDateAndNotifyListeners(DatePicker.java:846) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.DatePicker.zEventTextFieldChanged(DatePicker.java:896) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.DatePicker.zInternalSetDateTextField(DatePicker.java:831) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.DatePicker.setDate(DatePicker.java:561) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.CalendarPanel.userSelectedADate(CalendarPanel.java:1192) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.CalendarPanel.labelSetDateToTodayMousePressed(CalendarPanel.java:945) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.CalendarPanel.access$600(CalendarPanel.java:42) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.components.CalendarPanel$7.mouseLiberalClick(CalendarPanel.java:1207) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at com.github.lgooddatepicker.zinternaltools.MouseLiberalAdapter.mouseReleased(MouseLiberalAdapter.java:161) ~[JabRef-3.8.1-dev--snapshot--2016-12-19--master--8cfbc41.jar:?]
	at java.awt.Component.processMouseEvent(Component.java:6535) ~[?:1.8.0_66]
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[?:1.8.0_66]
	at java.awt.Component.processEvent(Component.java:6300) ~[?:1.8.0_66]
	at java.awt.Container.processEvent(Container.java:2236) ~[?:1.8.0_66]
	at java.awt.Component.dispatchEventImpl(Component.java:4891) ~[?:1.8.0_66]
	at java.awt.Container.dispatchEventImpl(Container.java:2294) ~[?:1.8.0_66]
	at java.awt.Component.dispatchEvent(Component.java:4713) ~[?:1.8.0_66]
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) ~[?:1.8.0_66]
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) ~[?:1.8.0_66]
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) ~[?:1.8.0_66]
	at java.awt.Container.dispatchEventImpl(Container.java:2280) ~[?:1.8.0_66]
	at java.awt.Window.dispatchEventImpl(Window.java:2750) ~[?:1.8.0_66]
	at java.awt.Component.dispatchEvent(Component.java:4713) ~[?:1.8.0_66]
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) ~[?:1.8.0_66]
	at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_66]
	at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_66]
	at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_66]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_66]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) ~[?:1.8.0_66]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:1.8.0_66]
	at java.awt.EventQueue$4.run(EventQueue.java:731) ~[?:1.8.0_66]
	at java.awt.EventQueue$4.run(EventQueue.java:729) ~[?:1.8.0_66]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_66]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) ~[?:1.8.0_66]
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) ~[?:1.8.0_66]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_66]
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_66]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_66]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_66]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_66]
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_66]
Caused by: java.time.DateTimeException: Unable to obtain ZoneId from TemporalAccessor: 2016-12-19 of type java.time.LocalDate
	at java.time.ZoneId.from(ZoneId.java:466) ~[?:1.8.0_66]
	at java.time.ZonedDateTime.from(ZonedDateTime.java:553) ~[?:1.8.0_66]
	... 41 more
@matthiasgeiger matthiasgeiger self-assigned this Dec 19, 2016
@matthiasgeiger
Copy link
Member

I'll fix this - thanks for reporting!

@matthiasgeiger
Copy link
Member

Okay... perhaps I was too optimistic 😉

This already works fine for me. Can you please provide me the DateFormat you have set in your preferences? (Prefs -> General)

@mlep
Copy link
Contributor Author

mlep commented Dec 19, 2016

yyyy-MM-dd
(which is the the standard ISO 8601 https://en.wikipedia.org/wiki/ISO_8601)

@matthiasgeiger
Copy link
Member

Okay... that was exactly the same value I have set ;-)

However, I might have fixed the problem in 4c11664 - Can you please check the build available at http://builds.jabref.org/datepicker-fix/? Thanks!

@mlep
Copy link
Contributor Author

mlep commented Dec 19, 2016

Clicking on the icon does not display the calendar anymore...

But double-clicking on the field still insert today's date (which looks to me an unusual behavior for JabRef).

matthiasgeiger added a commit that referenced this issue Dec 19, 2016
@matthiasgeiger matthiasgeiger mentioned this issue Dec 19, 2016
3 tasks
@matthiasgeiger
Copy link
Member

Okay I always tested at another "Date" field which worked fine - the problem was rather specific only for the "timestamp" field. Can you please check again with the new builds which should be available in a few minutes...

Regarding the "double click": actually this behavior is intentionally implemented in the source code (before date pickers where introduced this was the only way to set a date with assistance)

@mlep
Copy link
Contributor Author

mlep commented Dec 20, 2016

Not working yet: clicking on the icon does not display the calendar... (and no message in the console)

About the double-click: I will add this feature to the help file.

koppor pushed a commit that referenced this issue Dec 20, 2016
* use localdatetime instead of zonedDateTime
* refactoring and fix for #2403
* use standard DateTimeFormatter instead of custom EasyDateFormat class
@koppor
Copy link
Member

koppor commented Dec 20, 2016

Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you.

@koppor koppor added this to the v3.8.1 milestone Dec 20, 2016
@mlep
Copy link
Contributor Author

mlep commented Dec 20, 2016

Does not work for me, even after resetting the preferences... (JabRef-3.8.1-dev--snapshot--2016-12-20--master--b655bfd.jar)

@lenhard lenhard changed the title GUI:Timestamp does not work Timestamp does not work Dec 20, 2016
@lenhard lenhard added bug Confirmed bugs or reports that are very likely to be bugs ui labels Dec 20, 2016
@matthiasgeiger
Copy link
Member

Okay another try ;-)

Fix is already included in https://builds.jabref.org/master

Now it should work in almost every case - but if the current preference setting does not match the content of the timestamp field "clear" is not directly possible, but first a date has to be selected which then can be cleared afterwards (or clear the field simply by deleting the content).

@mlep
Copy link
Contributor Author

mlep commented Dec 21, 2016

Works for me too, now. Thanks!

koppor added a commit to JabRef/jabref-koppor that referenced this issue Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui
Projects
None yet
Development

No branches or pull requests

4 participants