B2 - invalid timestamp using S3 API
Related to: https://github.com/rhnvrm/simples3/issues/17#issuecomment-1076838291
I'm using listmonk with an S3-compatible B2 bucket. But I get the following error.
2022/03/23 21:23:08error uploading file: status code: 400 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Error>\n <Code>InvalidRequest</Code>\n <Message>Timestamp '20220323T212308Z' is invalid</Message>\n</Error>\n"
I tested using an AWS S3 bucket and was able to successfully upload an image. I tried to see if maybe there was an issue with the datetime string formatting. But I'm starting to suspect there is something slightly different in Backblaze's API versus AWS S3.
package main
import (
"fmt"
"time"
)
func main() {
amzDateISO8601TimeFormat := "20060102T150405Z"
time := time.Now().UTC()
amzdate := time.Format(amzDateISO8601TimeFormat)
fmt.Println(time)
fmt.Println(amzdate)
}
Hey
I just ran the unit tests and the files seem to get uploaded to Backblaze B2. (I had commented the FileUpload method as its not supported by B2 and only ran the FilePut method)

Would it be possible to share a snippet with the a sample file to reproduce this?
Closing as there has been no activity for a while and I could not reproduce this. Feel free to reopen with steps to reproduce. Thanks.