dasch-swiss / beol

Bernoulli-Euler OnLine
https://beol.dasch.swiss
GNU Affero General Public License v3.0
0 stars 1 forks source link

wrong dates! #75

Open SepidehAlassi opened 5 years ago

SepidehAlassi commented 5 years ago

Date presentations in BEOL are incorrect for some of the resources. For resource which has

"knora-api:dateValueHasCalendar": "GREGORIAN", "knora-api:dateValueHasEndEra": "CE", "knora-api:dateValueHasEndYear": 1786, "knora-api:dateValueHasStartEra": "CE", "knora-api:dateValueHasStartYear": 1786, "knora-api:hasPermissions": "CR knora-base:Creator|M knora-base:ProjectMember|V knora-base:KnownUser|RV knora-base:UnknownUser", "knora-api:valueAsString": "GREGORIAN:1786 CE" Date is correct in triplestore and knora returns correct date value. But in GUI the shown date is 1785 CE!!

screenshot 2018-11-28 16 43 46

In the new data please check the resource http:%2F%2Frdfh.ch%2F0801%2F0TRvVX9kSyabvaD5J1_7tQ

Since the problem is not true for all resources this sounds really fishy!

tobiasschweizer commented 5 years ago

his could be related to the native JS date object which is used for display. I will check that, too.

tobiasschweizer commented 5 years ago

maybe it is because months indexes are 0 based. And there is no month here: -1 => November of the previous year.

SepidehAlassi commented 5 years ago

yeah it seems like it is rounding with -1 to previous year! But what puzzles me is that it does not do the same thing for all dates which have just year precision!!!!!

tobiasschweizer commented 5 years ago

does it depend on the browser? we had some problems with Safari.

SepidehAlassi commented 5 years ago

I am using chrome

SepidehAlassi commented 5 years ago

@tobiasschweizer It is browser based!!! in Safari date is right!!!!!

screenshot 2018-11-28 17 09 48

tobiasschweizer commented 5 years ago

Could you please make an issue in Knora-UI and assign it to @flavens, referring to this issue?

I bet it is a problem with the constructor of the date object.

tobiasschweizer commented 5 years ago

the component in questions is: kui-date-value (viewer module)

tobiasschweizer commented 5 years ago

@andreas-aeschlimann suspsects that it could also be a time zone related problem.

andreas-aeschlimann commented 5 years ago

Commented in the other thread @tobiasschweizer.