Convert timezone and format

Discussion in 'Programming' started by khu84, Apr 15, 2009.

  1. #1
    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?
     
    khu84, Apr 15, 2009 IP
  2. robhustle

    robhustle Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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?
     
    robhustle, Apr 16, 2009 IP
  3. khu84

    khu84 Active Member

    Messages:
    441
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    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...
     
    khu84, Apr 16, 2009 IP