05-23-2017 10:56 AM
I recognized some serious date/time problems in Alfresco.
1: Alfresco completely ignores the local timezone. Even when set -Duser.timezone=Europe/Zurich in JAVA_OPTS in catalina.sh, it sets dates always as Zulu (UTC)
2: The informations in: Date and time format | Alfresco Documentation are partially wrong.
These dates are only applicable for fields like Creation Date or Last Modified Date
3: When I make a custom aspekct with a property of type date, it always sets the wrong date from date picker.
I set (iso) 2017-05-10, the CMIS query for that date field shows me 2017-05-09T22:00.00.000Z (see also #2,#1)
which is completely wrong and a huge problem, specially because this date should be furter processed by downstream processes via CMIS.
Can someone from alfresco please take care of all that problems and fix the date/time processing routines in Alfresco?
I know Oracle/Sun made serious bugs the (in the meantime) several date/time apis in Java, specially the last one in Java 8
is a declaration of bankruptcy by Oracle.
Maybe some diffrent java apis are in use by diffrent components which are incompatible.
11-03-2022 02:02 AM
My solution was easy but not nice. I find out that d:date property has internally also information about time. Search works as I expected when I set a value of hour in this property to more then 2.
So I created a rule which calls a js script after document creation or update. This script reads d:date property and sets its hour to value which works (I set value 9).
11-03-2022 04:39 AM
Can you share the js script code ? i'm a little slow with dates XD
11-03-2022 05:30 AM
I used this code:
var date = document.properties['myDoc:myDateProp']; if(date!=null){ date.setHours(9); document.properties['myDoc:myDateProp'] = date; document.save(); }
10-22-2018 08:32 AM
Explore our Alfresco products with the links below. Use labels to filter content by product module.