Error in setting lastmodifieddate in Java
===

I tried to set the lastmodifeddate of local folder file as the lastmodifieddate of FTP file.
But, in the return value it returns false and date is also not set properly. 

Here is the function,


     public static void getModifiedDateAndTimeFromFTPFile(String FTPHost, String FTPUserName, String FTPPassword, String FTPRemoteDirectory, String localFilePath, String fileName) {
        	try{
        		//get Local File 
            	File fileLocal = new File(localFilePath + fileName);
            	
        		//Connect to FTP and get the lastmodified time of File.
        		FTPClient client = new FTPClient();
            	client.connect(FTPHost);
            	client.login(FTPUserName, FTPPassword);
            	client.changeWorkingDirectory(FTPRemoteDirectory);        	
            	FTPFile ftpFile = client.listFiles(fileName)[0];
            	
            	//Get last_modified date of FTP file.
            	Date ftpFileDate = ftpFile.getTimestamp().getTime();
            	
            	//Now set date to the Local File.
        		boolean boolSetTime = fileLocal.setLastModified(ftpFileDate.getTime());
        		System.out.println("    Was last modified time set successfully ? : " + boolSetTime);       	
        	} catch (Exception ex) {
        		System.out.println("Error : " + ex.toString());
        	}
        }

Can anybody help me by pointing out my mistake? 

Thanks