Appointment.ShowLocalTime C# (CSharp) Méthode

ShowLocalTime() public static méthode

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

Usage Example

Exemple #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));
    }