ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

When converting a `time:Civil` with time-zone information to a string using `time:civilToString` API error is thrown #6986

Closed ayeshLK closed 2 months ago

ayeshLK commented 2 months ago

Description:

$subject

Consider the following code segment:

time:TimeZone zone = check new ("America/New_York");
time:Civil civilTime = zone.utcToCivil(utc);
string civilDate = check time:civilToString(civilTime);
io:println(civilDate);

This would throw following error:

error: civil.utcOffset must not be null

Related to: #778

ayeshLK commented 2 months ago

As per the offline discussion we had this is a bug fix and might break some scenarios where developers used the time:Civil records without proper utc-offsets. Hence, it was agreed to release a minor version of the package on top of 2201.8.x distribution.

Tagging @daneshk @TharmiganK @ThisaruGuruge

github-actions[bot] commented 2 months ago

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.