From Database Date Time Offset - CSharp System

CSharp examples for System:DateTimeOffset

Description

From Database Date Time Offset

Demo Code


using System.Globalization;
using System;//from   www  . j  ava  2s .c  o  m

public class Main{
        public static DateTimeOffset FromDatabaseDateTimeOffset(DateTime dateTime, TimeSpan utcOffset)
        {
            return new DateTimeOffset((dateTime + utcOffset).AsUnspecifed(), utcOffset);
        }
}

Related Tutorials