#650 Niagara 4 haystackSyncHis timezone issue

Craig Somers Thu 1 Nov

I am using Skyspark 3.0.15 to connect to a Niagara 4.4 supervisor via the nHaystack driver. The issue I am encountering is when doing a haystackSyncHis I see a hisErr: "haystack::CallErr: java.lang.RuntimeException: range.tz != rec: Chicago != New_York". All timezones in the Skyspark project are set to New_York. All timezones on the Niagara side (that I can see) are also set to New_York. When I do a query against the Niagara database read(haystackConn).haystackRead(point and tz) the timezone shows as New_York. When I do now().tz it shows as Chicago as the Skyspark server is in the Chicago timezone. I have set Time Zone Aliases under the NHaystackService in Niagara but that does not seem like where the issue lies. I am wondering why the Niagara histories are being read in with the Skyspark server timezone instead of the timezone that is defined in the Niagara history service and how this can be fixed.

Paul Quinn Fri 2 Nov

The error is indicating a SkySpark point record has the Chicago tz.

I see this issue often and it has always been a wrong time zone on the point record. Sometimes if you have the wrong timezone on the site and then create points and then go back and correct the site time zone, the points will still have the wrong time zone.

You can check the points with:

readAll(point and siteRef->dis=="site dis").findAll(x => x->tz != x->siteRef->tz)

You can also find points in err with:

readAll(siteRef->dis=="site dis" and point and hisErr)

You can edit the point records from the results to fix any issues.

Craig Somers Tue 6 Nov


Thank you for the suggestions. Unfortunately, the issue I am experiencing is not that simple. As mentioned in my original post, the site and all points have "New_York" for the time zone. The site and all points were originally set up in the New_York time zone and were never changed. I am convinced that somehow the time zone is not being read from Niagara properly and is defaulting to the time zone of the Skyspark server during the history sync. Has anyone else ran into this with Niagara 4.4?

Login or Signup to reply.