Skip to content

Commit beb6006

Browse files
committed
Merge branch 'release/15.4' into v15/dev
2 parents 7e57396 + cc9c33b commit beb6006

37 files changed

+216
-62
lines changed

src/Umbraco.Core/Extensions/ContentExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ public static ContentStatus GetStatus(this IContent content, ContentScheduleColl
245245
}
246246

247247
IEnumerable<ContentSchedule> expires = contentSchedule.GetSchedule(culture, ContentScheduleAction.Expire);
248-
if (expires != null && expires.Any(x => x.Date > DateTime.MinValue && DateTime.Now > x.Date))
248+
if (expires != null && expires.Any(x => x.Date > DateTime.MinValue && DateTime.UtcNow > x.Date))
249249
{
250250
return ContentStatus.Expired;
251251
}
252252

253253
IEnumerable<ContentSchedule> release = contentSchedule.GetSchedule(culture, ContentScheduleAction.Release);
254-
if (release != null && release.Any(x => x.Date > DateTime.MinValue && x.Date > DateTime.Now))
254+
if (release != null && release.Any(x => x.Date > DateTime.MinValue && x.Date > DateTime.UtcNow))
255255
{
256256
return ContentStatus.AwaitingRelease;
257257
}

src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ internal class AccessDto
2727
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoAccess_umbracoNode_id2")]
2828
public int NoAccessNodeId { get; set; }
2929

30-
[Column("createDate")]
30+
[Column("createDate", ForceToUtc = false)]
3131
[Constraint(Default = SystemMethods.CurrentDateTime)]
3232
public DateTime CreateDate { get; set; }
3333

34-
[Column("updateDate")]
34+
[Column("updateDate", ForceToUtc = false)]
3535
[Constraint(Default = SystemMethods.CurrentDateTime)]
3636
public DateTime UpdateDate { get; set; }
3737

src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ internal class AccessRuleDto
2525
[Column("ruleType")]
2626
public string? RuleType { get; set; }
2727

28-
[Column("createDate")]
28+
[Column("createDate", ForceToUtc = false)]
2929
[Constraint(Default = SystemMethods.CurrentDateTime)]
3030
public DateTime CreateDate { get; set; }
3131

32-
[Column("updateDate")]
32+
[Column("updateDate", ForceToUtc = false)]
3333
[Constraint(Default = SystemMethods.CurrentDateTime)]
3434
public DateTime UpdateDate { get; set; }
3535
}

src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal class AuditEntryDto
3030
[Length(Constants.Audit.IpLength)]
3131
public string? PerformingIp { get; set; }
3232

33-
[Column("eventDateUtc")]
33+
[Column("eventDateUtc", ForceToUtc = false)]
3434
[Constraint(Default = SystemMethods.CurrentDateTime)]
3535
public DateTime EventDateUtc { get; set; }
3636

src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ConsentDto
2929
[Length(512)]
3030
public string? Action { get; set; }
3131

32-
[Column("createDate")]
32+
[Column("createDate", ForceToUtc = false)]
3333
[Constraint(Default = SystemMethods.CurrentDateTime)]
3434
public DateTime CreateDate { get; set; }
3535

src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ internal class ContentScheduleDto
2424
[NullSetting(NullSetting = NullSettings.Null)] // can be invariant
2525
public int? LanguageId { get; set; }
2626

27+
// NOTE: this date is explicitly stored and treated as UTC despite the lack of "Utc" postfix.
2728
[Column("date")]
2829
public DateTime Date { get; set; }
2930

src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCleanupPolicyDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ internal class ContentVersionCleanupPolicyDto
2727
[NullSetting(NullSetting = NullSettings.Null)]
2828
public int? KeepLatestVersionPerDayForDays { get; set; }
2929

30-
[Column("updated")]
30+
[Column("updated", ForceToUtc = false)]
3131
public DateTime Updated { get; set; }
3232
}

src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal class ContentVersionCultureVariationDto
3333
[Column("name")]
3434
public string? Name { get; set; }
3535

36-
[Column("date")] // TODO: db rename to 'updateDate'
36+
[Column("date", ForceToUtc = false)] // TODO: db rename to 'updateDate'
3737
public DateTime UpdateDate { get; set; }
3838

3939
[Column("availableUserId")] // TODO: db rename to 'updateDate'

src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ContentVersionDto
2222
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_NodeId", ForColumns = "nodeId,current", IncludeColumns = "id,versionDate,text,userId,preventCleanup")]
2323
public int NodeId { get; set; }
2424

25-
[Column("versionDate")] // TODO: db rename to 'updateDate'
25+
[Column("versionDate", ForceToUtc = false)] // TODO: db rename to 'updateDate'
2626
[Constraint(Default = SystemMethods.CurrentDateTime)]
2727
public DateTime VersionDate { get; set; }
2828

src/Umbraco.Infrastructure/Persistence/Dtos/CreatedPackageSchemaDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CreatedPackageSchemaDto
2727
[NullSetting(NullSetting = NullSettings.NotNull)]
2828
public string Value { get; set; } = null!;
2929

30-
[Column("updateDate")]
30+
[Column("updateDate", ForceToUtc = false)]
3131
[Constraint(Default = SystemMethods.CurrentDateTime)]
3232
public DateTime UpdateDate { get; set; }
3333

0 commit comments

Comments
 (0)