Closed ranjeetkpGit closed 5 months ago
@ranjeetkpGit By "function deployed as Web App", did you mean using the aspnet core integration model on a .NET 8 isolated model? If not, please elaborate what you meant by that.
I could not reproduce the error you are mentioning, when using the code snippet you mentioned locally and when deploying to Azure Linux (consumption) platform. See https://shkr-net8-gh2363-lin-c-20240322.azurewebsites.net/api/timezone (Note: This test app link will expire on 3/29/2024). The method (TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")
) is returning a non null TimeZoneInfo
object.
Below is the source code I used for my function. You can see the source code of the full app here
[Function("TimeZone")]
public IActionResult GetTimeZone([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req)
{
return new OkObjectResult(new
{
RuntimeInformation.FrameworkDescription,
RuntimeInformation.OSDescription,
TimeZone1 = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"),
TimeZone2 = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")
});
}
@kshyju extremely sorry for mistake. This is not for Azure function but .Net 8 Web API. Editing and moving to app-service-announcements
https://github.com/Azure/app-service-announcements/issues/465
The app-service-announcements is for team announcements only.
Description
Hi, I am using following in .Net 6 based Web API deployed as Web App on Linux and it works fine TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time") and TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")
When we migrated to .Net 8 based Web API deployed as Web App on Linux it returns nothing in both the methods.
Steps to reproduce
Deploy .Net 6 based Web API as Web App on Linux with TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time") and TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time"). It will return 'Pacific Daylight Time' from first and 'Japan Standard Time' from second method
Now deploy .Net 8 based Web API as Web App on Linux with TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time") and TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time"). It will return nothing from both the methods
Deployment using Azure Devops Release-![image](https://github.com/Azure/azure-functions-dotnet-worker/assets/92055761/98ec5104-3ac9-4477-9893-67f529b40664)