Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timestamp cast to datetime #226

Merged
merged 7 commits into from
Dec 17, 2023
2 changes: 1 addition & 1 deletion src/NRedisStack/TimeSeries/DataTypes/TimeStamp.cs
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ public static implicit operator long(TimeStamp ts) =>
/// Implicit cast from TimeStamp to DateTime.
/// </summary>
/// <param name="timeStamp">TimeStamp</param>
public static implicit operator DateTime(TimeStamp timeStamp) => new DateTime(timeStamp);
public static implicit operator DateTime(TimeStamp timeStamp) => DateTimeOffset.FromUnixTimeMilliseconds(timeStamp).DateTime;

/// <summary>
/// Equality of TimeSeriesTuple objects