Java Calendar Time convertToTimeZone(Calendar time, TimeZone timeZone)

Here you can find the source of convertToTimeZone(Calendar time, TimeZone timeZone)

Description

convert To Time Zone

License

Apache License

Declaration

public static Calendar convertToTimeZone(Calendar time, TimeZone timeZone) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;

public class Main {
    public static Calendar convertToTimeZone(Calendar time, TimeZone timeZone) {
        Calendar foreignTime = new GregorianCalendar(timeZone);
        foreignTime.setTimeInMillis(time.getTimeInMillis());

        return foreignTime;
    }//  www .  j a  va2 s .  c  om
}

Related

  1. convertTimeToLocalTimezone(Long pTime, Calendar pTargetCal)
  2. convertTimeToString(Calendar time)
  3. convertToActiveDirectoryTime(Calendar calendar)
  4. convertToCalendar(long adTimeValue)
  5. convertToTimeStpam(Calendar cal)
  6. copyLocalTime(final Calendar from, final Calendar to)
  7. copyLocalTime(final Calendar from, final Calendar to)
  8. currentTimeAsCalendar()
  9. dateTimeToFMDateTime(Calendar dateTime)