From 437b4fedb5d19f4ad22389a39f27696a7c236762 Mon Sep 17 00:00:00 2001 From: ahmedisam99 Date: Tue, 3 Sep 2024 13:18:56 +0300 Subject: [PATCH] Use 'CultureInfo.InvariantCulture' when converting the unix timestamp to string --- src/Redis.OM/RedisObjectHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Redis.OM/RedisObjectHandler.cs b/src/Redis.OM/RedisObjectHandler.cs index ac22c3af..07317e28 100644 --- a/src/Redis.OM/RedisObjectHandler.cs +++ b/src/Redis.OM/RedisObjectHandler.cs @@ -371,7 +371,7 @@ internal static IDictionary BuildHashSet(this object obj) var val = (DateTime)property.GetValue(obj); if (val != default) { - hash.Add(propertyName, new DateTimeOffset(val).ToUnixTimeMilliseconds().ToString()); + hash.Add(propertyName, new DateTimeOffset(val).ToUnixTimeMilliseconds().ToString(CultureInfo.InvariantCulture)); } } else if (type == typeof(Vector))