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

virtual int32_t TimeZone::getOffset ( uint8_t  era,
int32_t  year,
int32_t  month,
int32_t  day,
uint8_t  dayOfWeek,
int32_t  millis,
UErrorCode status 
) const [pure virtual]

Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add to GMT to get local time in this time zone, taking daylight savings time into account) as of a particular reference date. The reference date is used to determine whether daylight savings time is in effect and needs to be figured into the offset that is returned (in other words, what is the adjusted GMT offset in this time zone at this particular date and time?). For the time zones produced by createTimeZone(), the reference data is specified according to the Gregorian calendar, and the date and time fields are local standard time.

Note: Don't call this method. Instead, call the getOffset(UDate...) overload, which returns both the raw and the DST offset for a given time. This method is retained only for backward compatibility.

era The reference date's era
year The reference date's year
month The reference date's month (0-based; 0 is January)
day The reference date's day-in-month (1-based)
dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday)
millis The reference date's milliseconds in day, local standard time
status Output param to filled in with a success or an error.
The offset in milliseconds to add to GMT to get local time. ICU 2.0

Implemented in OlsonTimeZone, RuleBasedTimeZone, SimpleTimeZone, and VTimeZone.

Referenced by Calendar::computeFields(), Calendar::computeZoneOffset(), getDisplayName(), VTimeZone::getOffset(), SimpleTimeZone::getOffset(), getOffset(), BasicTimeZone::getSimpleRulesNear(), BasicTimeZone::hasEquivalentTransitions(), SimpleDateFormat::parse(), TimeZoneRegressionTest::Test4084933(), TimeZoneRegressionTest::Test4126678(), TimeZoneRegressionTest::Test4154650(), TimeZoneBoundaryTest::TestBoundaries(), TimeZoneTest::TestVariousAPI518(), ucal_getDSTSavings(), and TimeZoneBoundaryTest::verifyDST().

Generated by  Doxygen 1.6.0   Back to index