mirror of
https://github.com/bitwarden/server.git
synced 2025-05-22 12:04:27 -05:00
Added support for DateTime?
This commit is contained in:
parent
9596b900db
commit
b56cc9231d
@ -195,6 +195,13 @@ public static class LicenseExtensions
|
||||
: default;
|
||||
}
|
||||
|
||||
if (underlyingType == typeof(DateTime))
|
||||
{
|
||||
return DateTime.TryParse(claim.Value, out var dateTimeValue)
|
||||
? (T)(object)dateTimeValue
|
||||
: default;
|
||||
}
|
||||
|
||||
if (underlyingType == typeof(DateTimeOffset))
|
||||
{
|
||||
return DateTimeOffset.TryParse(claim.Value, out var dateTimeOffsetValue)
|
||||
|
Loading…
x
Reference in New Issue
Block a user