We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description: The expected behaviour of the newly added time zone API is as follows.
import ballerina/time; import ballerina/io; public isolated function main() returns error? { time:Zone systemZone1 = check time:loadSystemZone(); time:Civil currentSystemCivil = systemZone1.utcToCivil(time:utcNow()); io:println(currentSystemCivil); time:Zone? systemZone2 = time:getZone("Asia/Colombo"); if systemZone2 is time:Zone { time:Civil currentSystemCivil1 = systemZone2.utcToCivil(time:utcNow()); io:println(currentSystemCivil1); } }
But it won't work as above due to this lang level issue in swan lake beta 06.
However, it will work as the following workaround. When ballerina language fixes the abovementioned issue, this workaround won't break.
import ballerina/time; import ballerina/io; public isolated function main() returns error? { time:TimeZone systemZone1 = check time:loadSystemZone(); time:Civil currentSystemCivil = systemZone1.utcToCivil(time:utcNow()); io:println(currentSystemCivil); time:Zone? systemZone2 = time:getZone("Asia/Colombo"); if systemZone2 is time:TimeZone { time:Civil currentSystemCivil1 = systemZone2.utcToCivil(time:utcNow()); io:println(currentSystemCivil1); } }
Affected Versions:
Related Issues (optional): ballerina-platform/ballerina-lang#34280
The text was updated successfully, but these errors were encountered:
Closing this issue since it is working in the latest Ballerina version(2201.10.0).
Sorry, something went wrong.
No branches or pull requests
Description:
The expected behaviour of the newly added time zone API is as follows.
But it won't work as above due to this lang level issue in swan lake beta 06.
However, it will work as the following workaround. When ballerina language fixes the abovementioned issue, this workaround won't break.
Affected Versions:
Related Issues (optional):
ballerina-platform/ballerina-lang#34280
The text was updated successfully, but these errors were encountered: