serious date/time problems in Alfresco

cancel
Showing results for 
Search instead for 
Did you mean: 
4535992
Senior Member

Re: serious date/time problems in Alfresco

did you find a solution for this  ?

del007
Active Member II

Re: serious date/time problems in Alfresco

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).

4535992
Senior Member

Re: serious date/time problems in Alfresco

Can you share the js script code ?  i'm a little slow with dates XD

del007
Active Member II

Re: serious date/time problems in Alfresco

I used this code:

var date = document.properties['myDoc:myDateProp'];
if(date!=null){  
  date.setHours(9);  
  document.properties['myDoc:myDateProp'] = date;  
  document.save();
}