How to find timeZone offset between two timezones in IBM BPM

Many a time during our development, we need to calculate the time zone offset (time difference) between two different time zones during the date manipulations. In this Post, I would like provide a simple function which will give the time Difference between two Time Zones.

function getTimeZoneOffset(zone1,zone2){
    var date=new TWDate();
    var dateString=date.format("MM/dd/yyyy");
    var Zone1Date=new TWDate();
    var Zone2Date=new TWDate();
    Zone1Date.parse(dateString, "MM/dd/yyyy", zone1);
    Zone2Date.parse(dateString, "MM/dd/yyyy", zone2);
    var offset= Math.ceil((Zone1Date.getTime()-Zone2Date.getTime())/(60*60));
    return offset;

Note: The above method ve offset in hours

This method can be used as below;

var offSet1=getTimeZoneOffset("EST","GMT") 
var offSet2=getTimeZoneOffset("GMT","EST")

offset1 is evaluated to '5' 
offset2 is evaluated to '-5'