Azure / Azure/azure-functions-host
[Custom Handlers] Differing timestamp formats between Service Bus triggers with cardinality of one vs many
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
`EnqueuedTimeUtc` and `ExpiresAtUtc` when cardinality is `one`:

vs `EnqueuedTimeUtc` and `ExpiresAtUtc` when cardinality is `many`:

#### Investigative information
Please provide the following:
- Timestamp: 2020-12-18 02:01:35.8498946
- Function App version: 3.0.14916.0
- Invocation ID: 0dfafcf9-ecb5-4059-88e9-545a663670cb (cardinality `one`) vs 97593e8b-2c6b-4114-a660-e30dd70a8c41 (cardinality `many`)
- Region: Central US
#### Repro steps
Create a custom handler function with a Service Bus trigger that has cardinality set to `one`.
#### Expected behavior
The `EnqueuedTimeUtc` and `ExpiresAtUtc` metadata fields are valid RFC 3339 timestamps.
#### Actual behavior
Parsing these values in Golang:
```
t, err := time.Parse(time.RFC3339, enqueuedTimeUtc)
```
fails with:

#### Known workarounds
Append "Z" to the timestamps before calling `time.Parse`.
#### Related information
function.json:
```
{
"bindings": [
{
"name": "messages",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "%MY_QUEUE%",
"connection": "MY_QUEUE_CONNECTION_STRING",
"cardinality": "one",
"dataType": "binary"
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.