diff --git a/EvitaDB.Client/Converters/DataTypes/EvitaDataTypesConverter.cs b/EvitaDB.Client/Converters/DataTypes/EvitaDataTypesConverter.cs index 94a640a..ab1e172 100644 --- a/EvitaDB.Client/Converters/DataTypes/EvitaDataTypesConverter.cs +++ b/EvitaDB.Client/Converters/DataTypes/EvitaDataTypesConverter.cs @@ -649,6 +649,10 @@ public static Currency[] ToCurrencyArray(GrpcCurrencyArray arrayValue) public static DateTimeOffset ToDateTimeOffset(GrpcOffsetDateTime offsetDateTimeValue) { + if (string.IsNullOrEmpty(offsetDateTimeValue.Offset)) + { + return DateTimeOffset.Now; + } TimeSpan hourOffset = TimeSpan.FromHours(int.Parse(offsetDateTimeValue.Offset.Substring(1, 2))); bool add = offsetDateTimeValue.Offset.ElementAt(0) == '+'; TimeSpan offset = add ? hourOffset : hourOffset.Negate();