I have a small job that reconciles data in one store with a neo4j graph, everything runs swimmingly on laptop but when I move it to a container for execution I get the below error, does anyone have any ideas on where to start digging into the problem?
"database returned error [Neo.ClientError.Statement.TypeError]: Unable to construct ZonedDateTime value: Unknown time-zone ID: Local"
I can confirm this is an issue, but I'm afraid this will be hard to fix (apart from explicitly setting a time zone with .UTC() or .In(*Location) or using aliases mentioned at the end).
Indeed, a raw time.Time instance corresponds to one of two Packstream types:
DateTimeWithZoneId (offset derived from explicitly provided time zone name)
In your example, the constructed time.Time refers to an implicit "Local" time zone name, as Golang itself calls it (try e.g. time.Now().Location().String()). This is unfortunately an invalid time zone name.
An alternative would be to call .Zone() on the time.Time instance, but this won't solve the problem, since it potentially returns an abbreviated time zone name such as "CEST" in my current case, which is yet another invalid name (contrary to the valid "Europe/Paris" e.g.).
If you care about the time zone, you will have to set it explicitly as shown above.
If you do not care about the time zone, please cast the time.Time to one of the driver-specific, "time zone less" aliases:
neo4j.Date
neo4j.LocalTime
neo4j.LocalDateTime
While they're all aliases of the standard time.Time, they are actually needed by the driver to be able to disambiguate the data to send to/receive from the server.