Converting from any local time to UTC


  • To convert the local time of a non-system time zone to UTC, use CTzConverter::ConvertToUniversalTime(), specifying the time zone to convert from:

    TInt errCode = myConverter->ConvertToUniversalTime(myTime, myZoneId); 
    These time conversions internally do the following:
    • fetch a number of 'actualized' rules applicable to the years around the supplied time and zone, where an 'actualized' rule defines a single and specific time of year when local time changes. It is derived from the encoded day rule defined in the Olson’s TZ database RULE.

    • cache these rules for subsequent use.

    • identify which rule immediately precedes the time supplied.

    • apply the appropriate offsets defined by this rule.