#650 Niagara 4 haystackSyncHis timezone issue

Craig Somers Thu 1 Nov 2018

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 2018

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 2018


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?

Leroy Simms Thu 27 Dec 2018

I have a project which has a Jace running 4.6 and I believe has the latest nHaystack version. It has been running for months with no issue. I had an issue at the SkySpark server (v3.0.17) were I had to restore the project from a backup. Immediately following that I suddenly was getting errors of

UnknownNameException: Rec missing or invalid 'tz' tag:

I then added a timeZoneAlliase to change US/Eastern to New_York. I then began getting a new error:

haystack::CallErr: java.lang.RuntimeException: range.tz != rec: New_York != UTC

Both the SkySpark Server and the Jace have always been on New_York time, but now it seems all histories are coming from the Jace as UTC. I have checked the time zone throughout the Jace and I cannot find anything that is set for UTC time. I've rebooted the Jace as well as the server and connected from a new SkySpark project but all the histories coming out of the Jace seem to be stuck on UTC time now. This also shows up as the tz on the connector in SkySpark; which I can manually change in SkySpark, but as soon as you ping the connector it goes back to UTC.

Any suggestions?

Leroy Simms Fri 28 Dec 2018

I found that if I manually add the tz tag to the haystack slot on the Niagara point the errors go away. However, I cannot find a way to batch add this tag in N4 and it would be very time consuming to manually add the tag to every point. I would typically do this through the programService, but I could only add the blank haystack slot I could not edit the dictionary value.

Login or Signup to reply.