I need to write a function in coldfusion-8 which will take the "dateTime", "timezone","offset" and "dateformat" as arguments it must return the dateTime in the given timezone. I am not sure how to convert the time in another time zone, can someone guide me on this?
Can you clarify the inputs: dateTime -> is that YOUR servers date and time, like from the now() function? timezone -> is this the timezone you are in, or the one you are translating to? offset -> Is this the offset of your server from gmt, or from the passed in timezone from gmt? what are the units for the offset? Hours?
dateTime will be any string showing any dateTime in the past according to server timezone. timezone is the timezone to which I want to convert. I think Its offset of server from gmt <- its not that important if the function gets able to convert timezone its ok...