From 77b9033db58b710c77f52d5bd01f5546b2b31914 Mon Sep 17 00:00:00 2001 From: Karanvir Nat Date: Wed, 22 Apr 2026 17:56:02 +0100 Subject: [PATCH 1/3] 88880 - Addition of sample code to demonstrate implementation of the TimeZone property in sessions. --- MAT.SQLRace.HelloData/Program.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/MAT.SQLRace.HelloData/Program.cs b/MAT.SQLRace.HelloData/Program.cs index 9e4c92e..a011bee 100644 --- a/MAT.SQLRace.HelloData/Program.cs +++ b/MAT.SQLRace.HelloData/Program.cs @@ -234,6 +234,35 @@ private static void CreateSessionAndAddData() clientSession.Close(); } + private static void CreateSessionWithTimeZoneValue() + { + ConnectionString = $@"DbEngine=SQLite;Data Source=c:\ssn2\test01.ssn2;"; + + var sessionManager = SessionManager.CreateSessionManager(); + + var clientSession1 = sessionManager.CreateSessionWithTeamId( + ConnectionString, + SessionKey.NewKey(), + "clientSession1", + DateTime.Now, + 45, + "Session", + "UTC+00:00"); + + var clientSession2 = sessionManager.CreateSession( + ConnectionString, + SessionKey.NewKey(), + "clientSession2", + DateTime.Now, + "Session"); + + var session1 = clientSession1.Session; + var session2 = clientSession2.Session; + + Console.WriteLine($"Session one created with timezone: {session1.TimeZone}"); + Console.WriteLine($"Session one created with timezone: {session2.TimeZone}"); + } + private static void TestMaxAndMinSampleIntervals() { ConnectionString = $@"DbEngine=SQLite;Data Source=c:\ssn2\test01.ssn2;"; From 3998a169d18fc9b7d02100b090b5bc411cdf8985 Mon Sep 17 00:00:00 2001 From: Karanvir Nat Date: Thu, 23 Apr 2026 10:13:00 +0100 Subject: [PATCH 2/3] Forgot to add a commented out line calling the newly added CreateSessionWithTimeZoneValue() method --- MAT.SQLRace.HelloData/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MAT.SQLRace.HelloData/Program.cs b/MAT.SQLRace.HelloData/Program.cs index a011bee..e46a2a4 100644 --- a/MAT.SQLRace.HelloData/Program.cs +++ b/MAT.SQLRace.HelloData/Program.cs @@ -77,6 +77,7 @@ private static void Main(string[] args) //LoadLiveFunction(); //WholeSessionsCompareMode(); //TestMaxAndMinSampleIntervals(); + //CreateSessionWithTimeZoneValue(); Console.WriteLine("Press ENTER key to close."); Console.ReadLine(); From 4c9000aab78c884dc61a89db148e0f719ff3f36f Mon Sep 17 00:00:00 2001 From: Karanvir Nat Date: Mon, 11 May 2026 08:30:37 +0100 Subject: [PATCH 3/3] Corrected one console message in the TimeZone method example as well as replacing DateTime.Now with DateTime.UtcNow --- MAT.SQLRace.HelloData/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAT.SQLRace.HelloData/Program.cs b/MAT.SQLRace.HelloData/Program.cs index e46a2a4..3aedee2 100644 --- a/MAT.SQLRace.HelloData/Program.cs +++ b/MAT.SQLRace.HelloData/Program.cs @@ -245,7 +245,7 @@ private static void CreateSessionWithTimeZoneValue() ConnectionString, SessionKey.NewKey(), "clientSession1", - DateTime.Now, + DateTime.UtcNow, 45, "Session", "UTC+00:00"); @@ -254,14 +254,14 @@ private static void CreateSessionWithTimeZoneValue() ConnectionString, SessionKey.NewKey(), "clientSession2", - DateTime.Now, + DateTime.UtcNow, "Session"); var session1 = clientSession1.Session; var session2 = clientSession2.Session; Console.WriteLine($"Session one created with timezone: {session1.TimeZone}"); - Console.WriteLine($"Session one created with timezone: {session2.TimeZone}"); + Console.WriteLine($"Session two created with timezone: {session2.TimeZone}"); } private static void TestMaxAndMinSampleIntervals()