Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ayeshLK opened this issue Sep 11, 2024 · 2 comments · Fixed by ballerina-platform/module-ballerina-time#487
Assignees
Labels
module/time Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug

Comments

@ayeshLK
Copy link
Member

ayeshLK commented Sep 11, 2024

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 ayeshLK self-assigned this Sep 11, 2024
@ayeshLK ayeshLK changed the title When converting a time:Civil with time-zone information to a string using time:civilToString API exception is thrown When converting a time:Civil with time-zone information to a string using time:civilToString API error is thrown Sep 11, 2024
@ayeshLK
Copy link
Member Author

ayeshLK commented Sep 12, 2024

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

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/time Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug
Projects
Archived in project
1 participant