Logo Search packages:      
Sourcecode: icu version File versions  Download package

UnicodeString & TimeZone::getCanonicalID ( const UnicodeString id,
UnicodeString canonicalID,
UBool isSystemID,
UErrorCode status 
) [static, inherited]

Returns the canonical system time zone ID or the normalized custom time zone ID for the given time zone ID.

id The input time zone ID to be canonicalized.
canonicalID Receives the canonical system time zone ID or the custom time zone ID in normalized format.
isSystemID Receives if the given ID is a known system time zone ID.
status Recevies the status. When the given time zone ID is neither a known system time zone ID nor a valid custom time zone ID, U_ILLEGAL_ARGUMENT_ERROR is set.
A reference to the result. ICU 4.0

Definition at line 1512 of file timezone.cpp.

References FALSE, TimeZone::getCustomID(), UnicodeString::remove(), TRUE, U_FAILURE, U_SUCCESS, and U_ZERO_ERROR.

    isSystemID = FALSE;
    if (U_FAILURE(status)) {
        return canonicalID;
    ZoneMeta::getCanonicalSystemID(id, canonicalID, status);
    if (U_SUCCESS(status)) {
        isSystemID = TRUE;
    } else {
        // Not a system ID
        status = U_ZERO_ERROR;
        getCustomID(id, canonicalID, status);
    return canonicalID;

Generated by  Doxygen 1.6.0   Back to index