×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    10

    What is the correct time format (UTC or Local time) in C++ API "ExportVCalL()"

    hi friends,

    What is the correct time format (UTC or local time) in API "ExportVCalL() of class CCalenExporter?
    In my window's emulator, I set clock as malesiya (Gmt + 8.00) and entered an event in emulator's Calendar with start/end time eg: 8:00/10:00AM on Sep 21, 2009. The Emulator displays the time correctly, but the time I got back through ExportVCalL() becomes DTSTART:20090921T000000Z and DTEND:20090921T020000Z. that is 12:00/02:00 AM on Sep 21, 2009

    but actualy i time is DTSTART:20090921T080000Z and DTEND:20090921T100000Z

    wt is the problem tell me.

    Is it only happening in Nokia's emulator?
    Is it a bug in API itself?
    Is there any work around to get correct time?

    Thanks!

    The complete VCalendar as following:
    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    UID:392
    DESCRIPTION:meee
    DTSTART:20090921T000000Z
    DTEND:20090921T020000Z
    X-EPOCAGENDAENTRYTYPE:APPOINTMENT
    CLASS:PUBLIC
    DCREATED:20090921T000000Z
    LAST-MODIFIED:20090921T134700Z
    END:VEVENT
    END:VCALENDAR


    i am restoreing the same vcalendar.
    but this time entries are 12:00 am /02:00 am
    but i want to add 8:00/10::am

    Regards,
    girija
    Last edited by girija_epigon; 2009-09-24 at 14:35.

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: What is the correct time format (UTC or Local time) in C++ API "ExportVCalL()"

    Do the entries appear in the calendar in the incorrect time or in your code in the incorrect time?
    From a pure code point of view it looks correct.

    The exported DTSTART is marked as Zulu time which is effectivly UTC and when its imported it will also be in UTC.
    It is up to you do fixup the offsets based on the current timezone using something like the RTz server to get the time offset for the current timezone.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    10

    Re: What is the correct time format (UTC or Local time) in C++ API "ExportVCalL()"

    Quote Originally Posted by Paul.Todd View Post
    Do the entries appear in the calendar in the incorrect time or in your code in the incorrect time?
    From a pure code point of view it looks correct.

    The exported DTSTART is marked as Zulu time which is effectivly UTC and when its imported it will also be in UTC.
    It is up to you do fixup the offsets based on the current timezone using something like the RTz server to get the time offset for the current timezone.

    i am exporting calender entries time is 8:00/10:00 am those are starting and end times
    but after importing the entries r 12:00/02::00 am how to solve that problem
    Calendar vcalendar is storing GMT time so that is storing that
    but i want GMT + 8:00 so storing time how i will store those things

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: What is the correct time format (UTC or Local time) in C++ API "ExportVCalL()"

    The output vcal data you have shown is correct. Generally speaking all dates and times are stored as utc so they correctly work across timezones. VCAL will export all dates in UTC so it removes the need for a timezone to be stored with the data.

    When the import imports the data the dates are timezone unaware. You need to render the dates correctly on the screen by converting them from UTC to local time. You can use RTz::ConvertToLocalTime to convert a TTime to the correct time in the current timezone or any arbitrary timezone of your choosing using the overload.

    So for example if I got that VCard (0000) and I lived in Helsinki then the imported vcal would still be 0000 so I would be responsible for deciding how to render the date in the appropriate timezone.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. the real UTC ( Universal Time )
    By telephia in forum Symbian
    Replies: 5
    Last Post: 2007-05-16, 18:10
  2. UTC representation of date time in Vcard e Ical Items
    By magistrali in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2004-10-18, 16:01
  3. Setting correct time on emulator?
    By sreenivasuluy in forum Symbian
    Replies: 1
    Last Post: 2004-09-13, 16:55
  4. How to get correct time.
    By dzaga in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-06, 22:03
  5. SMS time stamp format with time zone parameter?
    By turunhe in forum General Messaging
    Replies: 1
    Last Post: 2002-06-11, 07:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •