Skip to content

Improve date format for dates in triggerMetadata for servicebusQueue trigger. #351

@JoostLambregts

Description

@JoostLambregts

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions