A community member has associated this post with a similar question:
Azure function returned wrong value for datetime.now()

Only moderators can edit this content.

Why did Azure Functions use wrong output value for datetime.now() of pytz library?

Kübra Kutlu 0 Reputation points
2025-02-10T13:20:27.85+00:00

Hi,

Between 13th-15th of December 2024, my Azure Functions app written and deployed in Python produced a wrong result for the code below. It was stuck on 13th of December until the evening (around 7pm in Helsinki time) on 15th. What was the reason for this fault?

helsinki_tz = pytz.timezone('Europe/Helsinki')
current_time = datetime.now(helsinki_tz)
current_time_minus_1h = current_time - timedelta(hours=1)
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,002 questions
{count} votes