This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git
The following commit(s) were added to refs/heads/master by this push:
new e1d42c9 should use yyyy instead of YYYY in SimpleDateFormat
new f57e755 Merge pull request #97 from
xenoamess-fork/yyyy_instead_of_YYYY_in_SimpleDateFormat
e1d42c9 is described below
commit e1d42c938f35ac32e2344fad2f806318a9749fc2
Author: XenoAmess <[email protected]>
AuthorDate: Sat Jan 1 21:19:50 2022 +0800
should use yyyy instead of YYYY in SimpleDateFormat
---
.../apache/commons/net/examples/mail/IMAPExportMbox.java | 2 +-
.../apache/commons/net/examples/mail/POP3ExportMbox.java | 2 +-
src/main/java/org/apache/commons/net/ftp/FTP.java | 2 +-
src/main/java/org/apache/commons/net/ftp/FTPClient.java | 14 +++++++-------
.../org/apache/commons/net/ftp/parser/MLSxEntryParser.java | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git
a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
index 60c81f1..c6fffd8 100644
--- a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
@@ -90,7 +90,7 @@ public final class IMAPExportMbox
volatile long lastSeq = -1;
private final String lineSeparator;
private final SimpleDateFormat DATE_FORMAT // for mbox From_ lines
- = new SimpleDateFormat("EEE MMM dd HH:mm:ss YYYY");
+ = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
// e.g. INTERNALDATE "27-Oct-2013 07:43:24 +0000"
// for parsing INTERNALDATE
diff --git
a/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
b/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
index c6d2adc..da5d0c8 100644
--- a/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/POP3ExportMbox.java
@@ -184,7 +184,7 @@ public final class POP3ExportMbox
private static void writeMbox(final POP3Client pop3, final
OutputStreamWriter fw, final int i) throws IOException {
final SimpleDateFormat DATE_FORMAT // for mbox From_ lines
- = new SimpleDateFormat("EEE MMM dd HH:mm:ss YYYY");
+ = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
final String replyTo = "MAILER-DAEMON"; // default
final Date received = new Date();
try (final BufferedReader r = (BufferedReader)
pop3.retrieveMessage(i)) {
diff --git a/src/main/java/org/apache/commons/net/ftp/FTP.java
b/src/main/java/org/apache/commons/net/ftp/FTP.java
index 5e04b26..d796954 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTP.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTP.java
@@ -993,7 +993,7 @@ public class FTP extends SocketClient
* receive the reply, and return the reply code.
*
* @param pathname The pathname for which mtime is to be changed
- * @param timeval Timestamp in <code>YYYYMMDDhhmmss</code> format
+ * @param timeval Timestamp in <code>yyyyMMDDhhmmss</code> format
* @return The reply code received from the server.
* @throws FTPConnectionClosedException
* If the FTP server prematurely closes the connection as a result
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPClient.java
b/src/main/java/org/apache/commons/net/ftp/FTPClient.java
index f2184fe..0a7faf4 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPClient.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPClient.java
@@ -1891,11 +1891,11 @@ public class FTPClient extends FTP implements
Configurable {
/**
* Issue the FTP MDTM command (not supported by all servers) to retrieve
the last
* modification time of a file. The modification string should be in the
- * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
+ * ISO 3077 form "yyyyMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
* GMT, but not all FTP servers honor this.
*
* @param pathname The file path to query.
- * @return A string representing the last file modification time in
<code>YYYYMMDDhhmmss</code> format.
+ * @return A string representing the last file modification time in
<code>yyyyMMDDhhmmss</code> format.
* @throws IOException if an I/O error occurs.
* @since 2.0
*/
@@ -2943,7 +2943,7 @@ public class FTPClient extends FTP implements
Configurable {
/**
* Issue the FTP MDTM command (not supported by all servers) to retrieve
the last
* modification time of a file. The modification string should be in the
- * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
+ * ISO 3077 form "yyyyMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
* GMT, but not all FTP servers honor this.
*
* @param pathname The file path to query.
@@ -2963,7 +2963,7 @@ public class FTPClient extends FTP implements
Configurable {
/**
* Issue the FTP MDTM command (not supported by all servers) to retrieve
the last
* modification time of a file. The modification string should be in the
- * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
+ * ISO 3077 form "yyyyMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
* GMT, but not all FTP servers honor this.
*
* @param pathname The file path to query.
@@ -2987,7 +2987,7 @@ public class FTPClient extends FTP implements
Configurable {
/**
* Issue the FTP MDTM command (not supported by all servers) to retrieve
the last
* modification time of a file. The modification string should be in the
- * ISO 3077 form "YYYYMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
+ * ISO 3077 form "yyyyMMDDhhmmss(.xxx)?". The timestamp represented should
also be in
* GMT, but not all FTP servers honor this.
*
* @param pathname The file path to query.
@@ -3746,14 +3746,14 @@ public class FTPClient extends FTP implements
Configurable {
* Issue the FTP MFMT command (not supported by all servers) which sets
the last
* modified time of a file.
*
- * The timestamp should be in the form <code>YYYYMMDDhhmmss</code>. It
should also
+ * The timestamp should be in the form <code>yyyyMMDDhhmmss</code>. It
should also
* be in GMT, but not all servers honor this.
*
* An FTP server would indicate its support of this feature by including
"MFMT"
* in its response to the FEAT command, which may be retrieved by
FTPClient.features()
*
* @param pathname The file path for which last modified time is to be
changed.
- * @param timeval The timestamp to set to, in <code>YYYYMMDDhhmmss</code>
format.
+ * @param timeval The timestamp to set to, in <code>yyyyMMDDhhmmss</code>
format.
* @return true if successfully set, false if not
* @throws IOException if an I/O error occurs.
* @since 2.2
diff --git
a/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
b/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
index d0c6cd5..c1cfe44 100644
--- a/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
+++ b/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
@@ -97,7 +97,7 @@ public class MLSxEntryParser extends FTPFileEntryParserImpl
}
/**
- * Parse a GMT time stamp of the form YYYYMMDDHHMMSS[.sss]
+ * Parse a GMT time stamp of the form yyyyMMDDHHMMSS[.sss]
*
* @param timestamp the date-time to parse
* @return a Calendar entry, may be {@code null}
@@ -131,7 +131,7 @@ public class MLSxEntryParser extends FTPFileEntryParserImpl
}
/**
- * Parse a GMT time stamp of the form YYYYMMDDHHMMSS[.sss]
+ * Parse a GMT time stamp of the form yyyyMMDDHHMMSS[.sss]
*
* @param timestamp the date-time to parse
* @return a Calendar entry, may be {@code null}