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

Use UTC DateTime instead of DateTimeOffset in IAmAliveTime comparison #9341

Merged

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Feb 12, 2025

In #9303 I added an internal EffectiveIAmAliveTime to incorporate the StartTime and IAmAliveTime into a single property returning the maximum. The property was typed DateTimeOffset but when comparing to the DateTime values returned from some membership providers (such as ADO.NET with SqlClient), the stored value was being retrieved with an unspecified DateTimeKind and this caused it to be treated as a local time, causing warnings such as:

13:44:41:507 [WRN] [MembershipTableManager ] Noticed that silo xxx.xxx.xxx.xxx:11122:98364351 has not updated it's IAmAliveTime table column recently. Last update was at 12-2-2025 12:44:25 +01:00, now is 12-2-2025 12:44:41, no update for 01:00:16.3675547, which is more than 00:01:30.

This PR changes that property to a DateTime instead and treats the StartTime and IAmAliveTime properties as though they were UTC times.

Microsoft Reviewers: Open in CodeFlow

@ledjon-behluli
Copy link
Contributor

LGMT

@ReubenBond ReubenBond merged commit 8875430 into dotnet:main Feb 12, 2025
23 of 26 checks passed
@ReubenBond ReubenBond deleted the fix/effectiveiamalivetime-conversion branch February 12, 2025 17:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants