public override string ToString() { DateTime localUtcTime = UtcTime; if (!UtcTime.Equals(DateTime.MinValue)) localUtcTime = UtcTime.Add(TimeZoneOffset); return ToRoundTripString(localUtcTime, TimeZoneOffset); }
public bool Equals(ApiDateTime other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UtcTime.Equals(other.UtcTime) && TimeZoneOffset.Equals(other.TimeZoneOffset)); }
/// <summary> /// Equals the CalendarTime. /// </summary> /// <since_tizen> 4 </since_tizen> /// <param name="obj">The CalendarTime to be compared.</param> /// <returns> /// A 32-bit signed integer that indicates the relative order of the objects being compared. /// </returns> public override bool Equals(object obj) { var other = obj as CalendarTime; if (_type != other._type) { Log.Error(Globals.LogTag, "Not to compare with different type"); return(false); } if (_type == (int)Type.Utc) { return(UtcTime.Equals(other.UtcTime)); } else { return(LocalTime.Equals(other.LocalTime)); } }
public bool Equals(ApiDateTime other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return UtcTime.Equals(other.UtcTime)&& TimeZoneOffset.Equals(other.TimeZoneOffset); }
public bool Equals(ByteMessage other) { return(UtcTime.Equals(other.UtcTime) && LongValue.Equals(other.LongValue) && ByteValue.Equals(other.ByteValue)); }