Golang SetTime() - writes fail if time is not time.Now() - second topic

Hello. Similar topic was oppened 2 years ago, but it was not constructive.

I really havel problem with influxdb2. NEver had those problems with influxdb0.7 in combination with golang.

When using golang, newest version and influx, newest version also, i have problem with writing new point with time tag that is different than time.Now(). For example if i use time.Now().AddDate(-1,-1,-1) it is not working.

Here is my code:

client2 := influxdb2.NewClient(url, token)
p3 := influxdb2.NewPointWithMeasurement(“brenk”).AddTag(“unit”, “temp”).AddField(“avg”, 45.3).SetTime(time.Now().AddDate(-1,-1,-1))

writeApi := client2.WriteAPIBlocking(org, bucket)
writeApi.WritePoint(context.Background(), p3)

Or for example, this is what i really want from my timestamp:

	time2, err := time.Parse(time.RFC3339, "2018-10-02T13:45:00.498125450Z")
	if err != nil {
		fmt.Println(err)

	}

and when i use time2 as time, nothing is written in influx.

The similar code but with NewPoint method worked well with influxdb 0.7
Please help.

Thank you.

Sorry. my problem. please if possible delete this topic.