Skip to content

Commit

Permalink
adjust supp modified
Browse files Browse the repository at this point in the history
  • Loading branch information
th0mk committed Sep 10, 2024
1 parent a9d92e3 commit 5866f46
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/FMBot.Bot/Services/SupporterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ public async Task<Supporter> AddOpenCollectiveSupporter(ulong id, OpenCollective
var supporterToAdd = new Supporter
{
Name = openCollectiveUser.Name,
Created = DateTime.UtcNow,
Modified = DateTime.UtcNow,
Created = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc),
Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc),
Notes = "Added through OpenCollective integration",
SupporterMessagesEnabled = true,
VisibleInOverview = true,
Expand Down Expand Up @@ -626,7 +626,7 @@ public async Task UpdateExistingOpenCollectiveSupporters()
existingSupporter.Name, existingSupporter.LastPayment, openCollectiveSupporter.LastPayment);

existingSupporter.LastPayment = openCollectiveSupporter.LastPayment;
existingSupporter.Modified = DateTime.UtcNow;
existingSupporter.Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc);

Log.Information("Updating name for supporter {supporterName} to {newName}", existingSupporter.Name,
openCollectiveSupporter.Name);
Expand Down Expand Up @@ -852,7 +852,7 @@ public async Task UpdateDiscordSupporters(List<DiscordEntitlement> discordSuppor
var oldDate = existingSupporter.LastPayment;

existingSupporter.LastPayment = discordSupporter.EndsAt;
existingSupporter.Modified = DateTime.UtcNow;
existingSupporter.Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc);

db.Update(existingSupporter);
await db.SaveChangesAsync();
Expand Down Expand Up @@ -963,7 +963,7 @@ public async Task CheckExpiredDiscordSupporters()
var oldDate = existingSupporter.LastPayment;

existingSupporter.LastPayment = discordSupporter.EndsAt;
existingSupporter.Modified = DateTime.UtcNow;
existingSupporter.Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc);
db.Update(existingSupporter);
await db.SaveChangesAsync();

Expand Down Expand Up @@ -1239,7 +1239,7 @@ private async Task<Supporter> ReActivateSupporter(Supporter supporter, DiscordEn
supporter.SupporterMessagesEnabled = true;
supporter.VisibleInOverview = true;
supporter.LastPayment = entitlement.EndsAt;
supporter.Modified = DateTime.UtcNow;
supporter.Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc);

db.Update(supporter);
await db.SaveChangesAsync();
Expand Down

0 comments on commit 5866f46

Please sign in to comment.