Java TimeZone Format createDateFormat(TimeZone timezone)

Here you can find the source of createDateFormat(TimeZone timezone)

Description

create Date Format

License

Open Source License

Declaration

public static final DateFormat createDateFormat(TimeZone timezone) 

Method Source Code

//package com.java2s;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.Locale;
import java.util.TimeZone;

public class Main {
    public static final DateFormat createDateFormat(TimeZone timezone) {
        SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
        sdf.setTimeZone(timezone);//w w  w.  j  a v  a  2 s .  co  m
        return sdf;
    }
}

Related

  1. addDateFormatsToList(Locale locale, TimeZone timeZone, List formats)
  2. createDateFormat(String format, TimeZone tz)
  3. createDateFormat(String pattern, TimeZone timeZone)
  4. createDateFormatsForLocaleAndTimeZone(Locale locale, TimeZone timeZone)
  5. formatISO8601TimeZone(TimeZone timeZone, boolean extended)
  6. formatOffset(TimeZone zone)
  7. formatTimeZoneOffset(TimeZone timeZone)