All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eleme.openapi.sdk.media.utils.DateUtils Maven / Gradle / Ivy

There is a newer version: 1.30.71
Show newest version
package eleme.openapi.sdk.media.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.SimpleTimeZone;

/**
 * Created by huamulou on 15/12/13.
 */
public class DateUtils {

    public static String formatRfc822Date(Date date) {
        SimpleDateFormat rfc822DateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
        rfc822DateFormat.setTimeZone(new SimpleTimeZone(0, "GMT"));
        return rfc822DateFormat.format(date);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy