Skip to content

Commit

Permalink
Make TimeZoneConverter.ToUtc(DateTime, string) static
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Oct 2, 2024
1 parent a4f122f commit d528069
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Axuno.Tools.Tests/DateAndTime/TimeZoneConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void ConvertTimeZoneToUtc_ShouldReturnNull_WhenDateTimeOfAnyKindIsNull()
DateTime? dateTimeOfAnyKind = null;

// Act
var convertedDateTime = GetTimeZoneConverter("en-US").ToUtc(dateTimeOfAnyKind, "Europe/Berlin");
var convertedDateTime = Axuno.Tools.DateAndTime.TimeZoneConverter.ToUtc(dateTimeOfAnyKind, "Europe/Berlin");

// Assert
Assert.That(convertedDateTime, Is.Null);
Expand Down
2 changes: 1 addition & 1 deletion Axuno.Tools/DateAndTime/TimeZoneConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public DateTime ToUtc(DateTime zoneDateTime)
return ToUtc(zoneDateTime, _ianaTimeZoneId);
}

public DateTime? ToUtc(DateTime? zoneDateTime, string timeZoneId)
public static DateTime? ToUtc(DateTime? zoneDateTime, string timeZoneId)
{
if (!zoneDateTime.HasValue) return null;

Expand Down

0 comments on commit d528069

Please sign in to comment.