Azure function returned wrong value for datetime.now()

Kübra Kutlu 0 Reputation points
2025-02-10T13:34:14.7333333+00:00

Between 13th-15th of December 2024, my Azure function produced wrong results for the code below. It was stuck on 13th of December until 2024-12-15T17:08:05Z. I realized it because I save csv files to data lake with the naming "lam_data_{current_time_minus_1h.strftime('%Y%m%d')}.csv". 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)
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,576 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.