mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-08 12:37:46 +00:00
migrated to v15
This commit is contained in:
@@ -16,8 +16,16 @@ namespace PlexAPI.Utils
|
||||
|
||||
internal class IsoDateTimeSerializer: JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType) =>
|
||||
objectType == typeof(DateTime);
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
var nullableType = Nullable.GetUnderlyingType(objectType);
|
||||
if (nullableType != null)
|
||||
{
|
||||
return nullableType == typeof(DateTime);
|
||||
}
|
||||
|
||||
return objectType == typeof(DateTime);
|
||||
}
|
||||
|
||||
public override bool CanRead => false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user