Here you can find the source of toRfc1123String(FileTime time)
static String toRfc1123String(FileTime time)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Sebastian Stenzel/*from w w w. j av a 2 s.c om*/ * This file is licensed under the terms of the MIT license. * See the LICENSE.txt file for more info. * * Contributors: * Sebastian Stenzel - initial API and implementation ******************************************************************************/ import java.nio.file.attribute.FileTime; import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.time.temporal.Temporal; public class Main { static String toRfc1123String(FileTime time) { final Temporal date = OffsetDateTime.ofInstant(time.toInstant(), ZoneOffset.UTC); return DateTimeFormatter.RFC_1123_DATE_TIME.format(date); } }