Appointment.ShowLocalTime C# (CSharp) Method

ShowLocalTime() public static method

public static ShowLocalTime ( DateTime dtUtc ) : DateTime
dtUtc DateTime
return DateTime
    public static DateTime ShowLocalTime(DateTime dtUtc)
    {
        throw new NotImplementedException("Please implement the (static) Appointment.ShowLocalTime() method");
    }

Usage Example

Exemplo n.º 1
0
    public void ShowLocalTime()
    {
        var dtUtc  = new DateTime(2030, 07, 25, 13, 45, 0);
        var tzi    = TimeZoneInfo.Local;
        var offset = tzi.GetUtcOffset(dtUtc);

        Assert.Equal(dtUtc + offset, Appointment.ShowLocalTime(dtUtc));
    }