Skip to content

Commit

Permalink
Tiny cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Aug 10, 2023
1 parent e71b9f0 commit 9a94b91
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ private static readonly MethodInfo TimeOnly_IsBetween
private static readonly MethodInfo TimeOnly_Add_TimeSpan
= typeof(TimeOnly).GetRuntimeMethod(nameof(TimeOnly.Add), new[] { typeof(TimeSpan) })!;

private static readonly MethodInfo TimeZoneInfo_ConvertTimeBySystemTimeZoneId
private static readonly MethodInfo TimeZoneInfo_ConvertTimeBySystemTimeZoneId_DateTime
= typeof(TimeZoneInfo).GetRuntimeMethod(
nameof(TimeZoneInfo.ConvertTimeBySystemTimeZoneId), new[] { typeof(DateTime), typeof(string) })!;

private static readonly MethodInfo TimeZoneInfo_ConvertTimeBySystemTimeZoneId_DateTimeOffset
= typeof(TimeZoneInfo).GetRuntimeMethod(
nameof(TimeZoneInfo.ConvertTimeBySystemTimeZoneId), new[] { typeof(DateTimeOffset), typeof(string) })!;

private static readonly MethodInfo TimeZoneInfo_ConvertTimeToUtc
= typeof(TimeZoneInfo).GetRuntimeMethod(nameof(TimeZoneInfo.ConvertTimeToUtc), new[] { typeof(DateTime) })!;
// ReSharper restore InconsistentNaming
Expand Down Expand Up @@ -322,7 +326,7 @@ public NpgsqlDateTimeMethodTranslator(
MethodInfo method,
IReadOnlyList<SqlExpression> arguments)
{
if (method == TimeZoneInfo_ConvertTimeBySystemTimeZoneId)
if (method == TimeZoneInfo_ConvertTimeBySystemTimeZoneId_DateTime)
{
var typeMapping = arguments[0].TypeMapping;
if (typeMapping is null
Expand Down

0 comments on commit 9a94b91

Please sign in to comment.