commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r631518 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Date Wed, 27 Feb 2008 09:17:03 GMT
Author: rwinston
Date: Wed Feb 27 01:16:59 2008
New Revision: 631518

URL: http://svn.apache.org/viewvc?rev=631518&view=rev
Log:
Add timezone and date symbols to formatter (NET-188)

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java?rev=631518&r1=631517&r2=631518&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImpl.java
Wed Feb 27 01:16:59 2008
@@ -104,8 +104,10 @@
 				pp = new ParsePosition(0);
 				int year = Calendar.getInstance().get(Calendar.YEAR);
 				String timeStampStrPlusYear = timestampStr + " " + year;
-				SimpleDateFormat hackFormatter = new SimpleDateFormat(recentDateFormat.toPattern() +
" yyyy");
+				SimpleDateFormat hackFormatter = new SimpleDateFormat(recentDateFormat.toPattern() +
" yyyy", 
+						recentDateFormat.getDateFormatSymbols());
 				hackFormatter.setLenient(false);
+				hackFormatter.setTimeZone(recentDateFormat.getTimeZone());
 				parsed = hackFormatter.parse(timeStampStrPlusYear, pp);
 			}
 			if (parsed != null && pp.getIndex() == timestampStr.length() + 5) {



Mime
View raw message