[ https://issues.apache.org/jira/browse/IGNITE-24149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910649#comment-17910649 ]
Pavel Tupitsyn commented on IGNITE-24149: ----------------------------------------- Merged to main: [95e90871bf2c33353010a23bb2a00a99c06d6847|https://github.com/apache/ignite-3/commit/95e90871bf2c33353010a23bb2a00a99c06d6847] > .NET: Thin 3.0: Invalid ID for region-based ZoneId > -------------------------------------------------- > > Key: IGNITE-24149 > URL: https://issues.apache.org/jira/browse/IGNITE-24149 > Project: Ignite > Issue Type: Bug > Components: platforms, thin client > Affects Versions: 3.0 > Reporter: Pavel Tupitsyn > Assignee: Pavel Tupitsyn > Priority: Critical > Labels: ignite-3, important > Fix For: 3.0 > > Time Spent: 20m > Remaining Estimate: 0h > > {code:C#} > IIgniteClient client = await IgniteClient.StartAsync(cfg); > string script = "CREATE TABLE IF NOT EXISTS Person (Id int primary key, Name > varchar, Age int, CityId int);" + "INSERT INTO Person (1, 'John', 43, 1)"; > await client.Sql.ExecuteScriptAsync(script); // Exception thrown here: > Invalid ID for region-based ZoneId, invalid format: Bangladesh Standard Time > {code} > * Java uses IANA (tzdb) ids: > https://en.wikipedia.org/wiki/List_of_tz_database_time_zones > * We pass *TimeZoneInfo.Local.Id* which does not always match a tzdb id > Potential fixes: > * Use *TimeZoneInfo.TryConvertWindowsIdToIanaId* > * Use NodaTime API *DateTimeZoneProviders.Tzdb.GetSystemDefault().Id* > h2. Workaround > Specify *TimeZoneId* manually. > {code:c#} > await Client.Sql.ExecuteScriptAsync(new SqlStatement("CREATE TABLE") { > TimeZoneId = "Asia/Dhaka" }); > await Client.Sql.ExecuteScriptAsync(new SqlStatement("CREATE TABLE") { > TimeZoneId = DateTimeZoneProviders.Tzdb.GetSystemDefault().Id }); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)