AnsweredAssumed Answered

Set create date problem

Question asked by mangar on May 20, 2010
Latest reply on May 21, 2010 by mangar
I am trying to import files from a legacy system. I got all the directories and files to move fine, but I need to keep the original create date. I get it fine and use the ISODateFormat to format. Everything works with no errors, I go to alfresco and look at it, it has today's date! here is the relevant code:

           NamedValue createDateValue = Utils.createNamedValue("{}created", fileDate);
           NamedValue modDateValue = Utils.createNamedValue("{}modified", fileDate);
            NamedValue[] contentProps = new NamedValue[] {createDateValue,modDateValue};

            // Construct CML statement to create test doc content node           
            CMLCreate createDoc = new CMLCreate("ref1", docParent, null, null, null, Constants.createQNameString(NAMESPACE, CONTENT_TYPE), contentProps);
            CML cml = new CML();
            cml.setCreate(new CMLCreate[] {createDoc});

like I said - no errors are being thrown, just today's date is being thrown.