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

const TimeZone & DateFormat::getTimeZone ( void   )  const [virtual, inherited]

Returns a reference to the TimeZone used by this DateFormat's calendar.

Returns:
the time zone associated with the calendar of DateFormat. ICU 2.0

Definition at line 477 of file datefmt.cpp.

References TimeZone::createDefault(), DateFormat::fCalendar, Calendar::getTimeZone(), and NULL.

Referenced by DateFormatRegressionTest::Test4089106(), and DateFormatRegressionTest::Test4103341().

{
    if (fCalendar != NULL) {
        return fCalendar->getTimeZone();
    }
    // If calendar doesn't exists, create default timezone.
    // fCalendar is rarely null
    return *(TimeZone::createDefault());
}


Generated by  Doxygen 1.6.0   Back to index