public void OffsetTime(int days, int hours, int minutes) { var Offset = new TimeSpan(days, hours, minutes, 0); DateTime timeAfter = Timestamp.Add(Offset); _compensateForTimeChangeDueToDst(timeAfter); }
public override object GetValueForColumn(int columnIndex) { switch (columnIndex) { case 1: return(mIndex); case 2: return(MessageType.ToString()); case 3: return(Timestamp.Add(mTimeShiftOffset).ToString( Settings.Default.TimestampFormat , CultureInfo.InvariantCulture)); case 4: return(IpEndPoint.Address.ToString()); case 5: return(IpEndPoint.Port); case 6: return(Size); } return(null); }
public GibraltarRateLimitException(string message, TimeSpan?delay) : base(message) { Timestamp = DateTimeOffset.Now; Delay = delay; if (delay.HasValue) { RetryAfter = Timestamp.Add(delay.Value); } else { RetryAfter = Timestamp.AddSeconds(1); } }
/// <summary> /// /// </summary> /// <param name="Timestamp"></param> /// <param name="Duration"></param> /// <returns></returns> public static DbaDateTimeBase operator +(DbaDateTimeBase Timestamp, TimeSpan Duration) { return(Timestamp.Add(Duration)); }
/// <summary> /// Add the goodFor time span to the cached object's timestamp /// </summary> /// <param name="goodFor">How long the object is good for</param> public void setTimeout(TimeSpan goodFor) { Expires = Timestamp.Add(goodFor); }