Skip to content

Commit 18c6f7e

Browse files
committed
Use constant
1 parent 2b4e51b commit 18c6f7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileObject.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import org.apache.commons.io.function.Uncheck;
3333
import org.apache.commons.lang3.ArrayUtils;
34+
import org.apache.commons.lang3.time.TimeZones;
3435
import org.apache.commons.logging.Log;
3536
import org.apache.commons.logging.LogFactory;
3637
import org.apache.commons.net.ftp.FTPFile;
@@ -550,7 +551,7 @@ private long getTimestampMillis() throws IOException {
550551
final FtpClient client = abstractFileSystem.getClient();
551552
if (!mdtmSet && client.hasFeature("MDTM")) {
552553
final Instant mdtmInstant = client.mdtmInstant(relPath);
553-
final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
554+
final Calendar calendar = Calendar.getInstance(TimeZones.GMT);
554555
final long epochMilli = mdtmInstant.toEpochMilli();
555556
calendar.setTimeInMillis(epochMilli);
556557
ftpFile.setTimestamp(calendar);

0 commit comments

Comments
 (0)