Exemple #1
0
 // Convert this DateTime value into UTC time.
 public DateTime ToUniversalTime()
 {
     return(new DateTime
                (value_ + ((long)(TimeMethods.GetTimeZoneAdjust(value_))) *
                TimeSpan.TicksPerSecond));
 }
Exemple #2
0
            // Get the offset from UTC of this timezone at a given time.
            public override TimeSpan GetUtcOffset(DateTime time)
            {
                int secs = TimeMethods.GetTimeZoneAdjust(time.Ticks);

                return(new TimeSpan(-secs * TimeSpan.TicksPerSecond));
            }