Logo Search packages:      
Sourcecode: icu version File versions

VTimeZone * VTimeZone::createVTimeZone ( const UnicodeString vtzdata,
UErrorCode status 
) [static]

Create a VTimeZone instance by RFC2445 VTIMEZONE data

vtzdata The string including VTIMEZONE data block
status Output param to filled in with a success or an error.
A VTimeZone initialized by the VTIMEZONE data or NULL if failed to load the rule from the VTIMEZONE data. ICU 3.8

Definition at line 1077 of file vtzone.cpp.

References load(), NULL, U_FAILURE, and VTimeZone().

    if (U_FAILURE(status)) {
        return NULL;
    VTZReader reader(vtzdata);
    VTimeZone *vtz = new VTimeZone();
    vtz->load(reader, status);
    if (U_FAILURE(status)) {
        delete vtz;
        return NULL;
    return vtz;

Generated by  Doxygen 1.6.0   Back to index