using System;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Jellyfin.Server.Implementations.ValueConverters
{
    /// 
    /// ValueConverter to specify kind.
    /// 
    public class DateTimeKindValueConverter : ValueConverter
    {
        /// 
        /// Initializes a new instance of the  class.
        /// 
        /// The kind to specify.
        /// The mapping hints.
        public DateTimeKindValueConverter(DateTimeKind kind, ConverterMappingHints? mappingHints = null)
            : base(v => v.ToUniversalTime(), v => DateTime.SpecifyKind(v, kind), mappingHints)
        {
        }
    }
}