From b9a95a32a2897b3d939ec96e6083ef3b812f75e6 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:32:58 +0300 Subject: [PATCH] [dotnet] Fixed parsing of the year in ConsoleApiCalledEventArgs cdp event args Fixes #13654 --- dotnet/src/webdriver/DevTools/v120/V120JavaScript.cs | 2 +- dotnet/src/webdriver/DevTools/v121/V121JavaScript.cs | 2 +- dotnet/src/webdriver/DevTools/v122/V122JavaScript.cs | 2 +- dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/src/webdriver/DevTools/v120/V120JavaScript.cs b/dotnet/src/webdriver/DevTools/v120/V120JavaScript.cs index 01aa1d8eb649e..ed70f1034ff57 100644 --- a/dotnet/src/webdriver/DevTools/v120/V120JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v120/V120JavaScript.cs @@ -175,7 +175,7 @@ private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs var wrapped = new ConsoleApiCalledEventArgs() { - Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), Type = e.Type, Arguments = args.AsReadOnly() }; diff --git a/dotnet/src/webdriver/DevTools/v121/V121JavaScript.cs b/dotnet/src/webdriver/DevTools/v121/V121JavaScript.cs index 720fb1063ee62..886f10d256bb5 100644 --- a/dotnet/src/webdriver/DevTools/v121/V121JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v121/V121JavaScript.cs @@ -175,7 +175,7 @@ private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs var wrapped = new ConsoleApiCalledEventArgs() { - Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), Type = e.Type, Arguments = args.AsReadOnly() }; diff --git a/dotnet/src/webdriver/DevTools/v122/V122JavaScript.cs b/dotnet/src/webdriver/DevTools/v122/V122JavaScript.cs index 3aff8fab7551b..20ba05021ed2d 100644 --- a/dotnet/src/webdriver/DevTools/v122/V122JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v122/V122JavaScript.cs @@ -175,7 +175,7 @@ private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs var wrapped = new ConsoleApiCalledEventArgs() { - Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), Type = e.Type, Arguments = args.AsReadOnly() }; diff --git a/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs b/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs index b7f921cca0deb..e43a12d3e683d 100644 --- a/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs +++ b/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs @@ -175,7 +175,7 @@ private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs var wrapped = new ConsoleApiCalledEventArgs() { - Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), Type = e.Type, Arguments = args.AsReadOnly() };