Azure / Azure/azure-functions-nodejs-library

Improve date format for dates in triggerMetadata for servicebusQueue trigger.

Open
#351 1 comment 1 reaction 1 assignee Assigned to @Copilot View on GitHub
area:nodejs-functions
Dominant language
TypeScript
Stars
70
Forks
35
Avg merge
4d 18h
Merged PRs (30d)
6

Description

I have an Azure Function with a servicebus queue trigger, using the app.serviceBusQueue function in @azure/functions. I get the enqueuedTimeUtc and expiresAtUTC from context.triggerMetadata. I would exptect these to either be Date object, or an ISO8601 compliant date string. Instead, they are formatted as local strings.

Actual format: 2025-06-07T14:46:55.145

Expected format: 2025-06-07T14:46:55.145Z

This matters when trying to parse the string into a Date. the new Date() function will use the system timezone when no timezone is specified. This makes the behavior dependant on the timezone settings of the function host.

I am using extension bundle 4.x, and azure/functions v4.7.2.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.