コード例 #1
0
        public TimeSpan GetDstOffset(Moment moment)
        {
            TimeZoneImplementation effectiveImplementation = GetEffectiveImplementation(moment);
            TimeSpan rawOffset = GetRawOffset(moment);

            // Guard: if the effectiveImplementation has no Daylight Savings Adjustment
            if (null == effectiveImplementation.DaylightSavingsAdjustment)
            {
                return(TimeSpan.Zero);
            }

            AbstractDaylightSavingsAdjustment daylightSavingsAdjustment =
                effectiveImplementation.DaylightSavingsAdjustment;
            TimeSpan dstOffset = daylightSavingsAdjustment.GetAdjustmentToStandardOffset(rawOffset, moment);

            return(dstOffset);
        }
コード例 #2
0
        public String GetAbbreviation(Moment moment)
        {
            TimeZoneImplementation effectiveImplementation = GetEffectiveImplementation(moment);

            return(effectiveImplementation.GetTimeZoneAbbreviation(moment));
        }