mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4192 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4197 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4205 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4206 . svn resolved root\projects\repository\source\java\org\alfresco\filesys\server\config\ServerConfiguration.java svn revert root\projects\repository\config\alfresco\version.properties svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4219 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4224 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4631 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.alfresco.filesys.ftp;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -37,6 +38,11 @@ public class FTPDate
|
||||
protected final static String[] _months = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
|
||||
"Nov", "Dec" };
|
||||
|
||||
// Machine listing date/time formatters
|
||||
|
||||
protected final static SimpleDateFormat _mlstFormat = new SimpleDateFormat( "yyyyMMddHHmmss");
|
||||
protected final static SimpleDateFormat _mlstFormatLong = new SimpleDateFormat( "yyyyMMddHHmmss.SSS");
|
||||
|
||||
/**
|
||||
* Pack a date string in Unix format The format is 'Mmm dd hh:mm' if the file is less than six
|
||||
* months old, else the format is 'Mmm dd yyyy'.
|
||||
@@ -104,4 +110,26 @@ public class FTPDate
|
||||
buf.append(min);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a machine listing date/time, in the format 'YYYYMMDDHHSS'.
|
||||
*
|
||||
* @param dateTime long
|
||||
* @return String
|
||||
*/
|
||||
public final static String packMlstDateTime( long dateTime)
|
||||
{
|
||||
return _mlstFormat.format( new Date( dateTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a machine listing date/time, in the format 'YYYYMMDDHHSS.sss'.
|
||||
*
|
||||
* @param dateTime long
|
||||
* @return String
|
||||
*/
|
||||
public final static String packMlstDateTimeLong( long dateTime)
|
||||
{
|
||||
return _mlstFormatLong.format( new Date( dateTime));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user