public class TimeZoneServiceNew{ public static string EST='America/New_York'; ///Convert Any time to other timezone public DateTime convertDateTimeToOtherTimeZone(DateTime dttime, string sourceTimezone, string targetTimezone) { TimeZone tz = Timezone.getTimeZone(sourceTimezone); System.debug('Display name: ' + tz.getDisplayName()); System.debug('ID: ' + tz.getID()); Integer offset=tz.getOffset(dttime); System.debug('Offset: ' + offset); // target Timezone. TimeZone targetTZ = Timezone.getTimeZone(targetTimezone); System.debug('Display name: ' + targetTZ.getDisplayName()); integer offsetTotargetTZ = targetTZ.getOffset(dttime); integer correction = offsetTotargetTZ- offset; DateTime targetDT = dttime.addMinutes(correction / (1000 * 60)); //return Time.newInstance(targetDT.hour(), targetDT.minute(), targetDT.second(), targetDT.millisecond()); return targetDT; } }