Rock.RockDateTime.ConvertLocalDateTimeToRockDateTime C# (CSharp) Method

ConvertLocalDateTimeToRockDateTime() public static method

Converts the local date time to rock date time. Use this to convert a local datetime (for example, the datetime of a file stored on the server) to the Rock OrgTimeZone
public static ConvertLocalDateTimeToRockDateTime ( System.DateTime localDateTime ) : System.DateTime
localDateTime System.DateTime The local date time.
return System.DateTime
        public static DateTime ConvertLocalDateTimeToRockDateTime( DateTime localDateTime )
        {
            return TimeZoneInfo.ConvertTime( localDateTime, OrgTimeZoneInfo );
        }