LiquidTechnologies.XmlObjects Namespace / LxDateTime Structure / Equals Method / Equals(LxDateTime,TimeZoneInfo) Method
The LxDateTime to be compare for equality
Determines how date/times with no timezone are treated

In This Topic
    Equals(LxDateTime,TimeZoneInfo) Method
    In This Topic
    Compares this LxDateTime with another for equality
    Syntax
    'Declaration
     
    
    Public Overloads Function Equals( _
       ByVal dt As LxDateTime, _
       ByVal defaultTimeZone As System.TimeZoneInfo _
    ) As System.Boolean
    public System.bool Equals( 
       LxDateTime dt,
       System.TimeZoneInfo defaultTimeZone
    )

    Parameters

    dt
    The LxDateTime to be compare for equality
    defaultTimeZone
    Determines how date/times with no timezone are treated

    Return Value

    true if the 2 LxDateTime objects have the same Type and when converted to UTC have the same value.
    Remarks
    Compares the current LxDateTime with dt for equality.
    In order to be considered equal both LxDateTime objects must have the same Type.
    The values are then converted to UTC and compared.
    Care should be taken when using System.TimeZoneInfo.Local in timezones other than UTC0. For example if the local timezone is +05:00, Then the value 10:30:00 will not be equal to 10:30:00Z (as 10:30:00 will be seen as a local date 10:30:00+05:00, which is not equal to 10:30:00Z).
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2016, Windows Server 2012, Windows Server 2008. Please ensure you have the latest Service Pack for your operating system installed.

    See Also