Ejemplo n.º 1
0
        public override string ToString()
        {
            DateTime localUtcTime = UtcTime;

            if (!UtcTime.Equals(DateTime.MinValue))
                localUtcTime = UtcTime.Add(TimeZoneOffset);

            return ToRoundTripString(localUtcTime, TimeZoneOffset);
        }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
        /// <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));
            }
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 public bool Equals(ByteMessage other)
 {
     return(UtcTime.Equals(other.UtcTime) && LongValue.Equals(other.LongValue) &&
            ByteValue.Equals(other.ByteValue));
 }