googleapis / googleapis/google-cloud-go
storage: HTTP client strips milliseconds from `Custom-Time`
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
**Client**
Storage
**Environment**
Any
**Go Environment**
Go 1.21
**Code**
**Expected behavior**
Milliseconds are supported as per https://cloud.google.com/storage/docs/metadata#custom-time and should not be stripped.
**Actual behavior**
Milliseconds are stripped due to using `time.RFC3339`.
https://github.com/googleapis/google-cloud-go/blob/fbe78a28e01043b059e86c6e960d092b299ac9a4/storage/storage.go#L1090-L1093
**Screenshots**

**Additional context**
gRPC client looks correct:
https://github.com/googleapis/google-cloud-go/blob/fbe78a28e01043b059e86c6e960d092b299ac9a4/storage/storage.go#L1135
https://github.com/googleapis/google-cloud-go/blob/fbe78a28e01043b059e86c6e960d092b299ac9a4/storage/storage.go#L1364-L1370
Contributor guide
Assessment
This issue has not been assessed yet.