2 Replies Latest reply on Jul 17, 2006 10:13 AM by Newsgroup_User

    time on vcal

    Level 7
      I'm using this script to create a vcs file :
      <CFOUTPUT query="leadappts">
      BEGIN:VCALENDAR
      PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
      VERSION:1.0
      BEGIN:VEVENT
      DTSTART:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(appttime, "HHmm")#00Z
      DTEND:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(appttime, "HHmm")#00Z
      UID:040000008200E00074C5B7101A82E0080000000010962472EEEBC3010000000000000000100
      00000D7AED806CB3D774CB4A0009533B49186
      SUMMARY;ENCODING=QUOTED-PRINTABLE:appointment with #firstname# #lastname#
      DESCRIPTION;ENCODING=QUOTED-PRINTABLE:#details#
      PRIORITY:1
      END:VEVENT
      END:VCALENDAR
      </CFOUTPUT>

      In ex. I put 12:00 as hour, the vcs created show me the 5:00, that's -7
      hours.
      This is with GMT, but I don't know how to set it correctly.

      Any help really appreciated.
      Thank you.

      regards,
      Adrian C.




        • 1. Re: time on vcal
          dempster Level 1
          You need to use the DateConvert function to convert local time to UTC time. Needs a date/time object:

          <CFSET startutc = DateConvert('local2utc', apptdate)>

          Then in your output:

          DTSTART:#DateFormat(startutc,"yyyymmdd")#T#TimeFormat(startutc, "HHmm")#00Z

          • 2. Re: time on vcal
            Level 7
            or :

            DTSTART:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(DateAdd("h",7,appttime),
            "HHmm")#00Z
            DTEND:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(DateAdd("h",7,appttime),
            "HHmm")#00Z

            me, being in a -7 hours difference.

            Thank you. Really appreciate it.

            "Adrian C." <vadrianc@gmail.com> wrote in message
            news:e996sd$rrt$1@forums.macromedia.com...
            > I'm using this script to create a vcs file :
            > <CFOUTPUT query="leadappts">
            > BEGIN:VCALENDAR
            > PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
            > VERSION:1.0
            > BEGIN:VEVENT
            > DTSTART:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(appttime,
            > "HHmm")#00Z
            > DTEND:#DateFormat(apptdate,"yyyymmdd")#T#TimeFormat(appttime, "HHmm")#00Z
            > UID:040000008200E00074C5B7101A82E0080000000010962472EEEBC3010000000000000000100
            > 00000D7AED806CB3D774CB4A0009533B49186
            > SUMMARY;ENCODING=QUOTED-PRINTABLE:appointment with #firstname# #lastname#
            > DESCRIPTION;ENCODING=QUOTED-PRINTABLE:#details#
            > PRIORITY:1
            > END:VEVENT
            > END:VCALENDAR
            > </CFOUTPUT>
            >
            > In ex. I put 12:00 as hour, the vcs created show me the 5:00, that's -7
            > hours.
            > This is with GMT, but I don't know how to set it correctly.
            >
            > Any help really appreciated.
            > Thank you.
            >
            > regards,
            > Adrian C.
            >
            >
            >
            >