I have a digital point that I set to True at 29.03.2015 23:55:00 UTC time. In PI System Management Tool I see this value as which is correct to my timezone since here in norway we changed to "summertime" on the 29th of March:
This is all values for mypoint.
I have a filtered summary on this point to count how many times it is true within a range (last 14 days)
This is test code I have written:
var endTime = new AFTime(DateTime.SpecifyKind(new DateTime(2015, 3, 30), DateTimeKind.Utc)); var startTime = new AFTime(endTime.UtcTime.AddDays(-14)); var point = PIPoint.FindPIPoint(server, "mypoint"); const string expression = "'mypoint' = \"True\""; var afStartTime = new AFTime(startTime); var afEndTime = new AFTime(endTime); var range = new AFTimeRange(afStartTime, afEndTime); var result = point.FilteredSummaries( range, new AFTimeSpan(days: 1), expression, AFSummaryTypes.Count, AFCalculationBasis.EventWeighted, AFSampleType.ExpressionRecordedValues, new AFTimeSpan(seconds: 1), AFTimestampCalculation.Auto)[AFSummaryTypes.Count];
The problem is that in the resultset I have 14 entries, but all of them are shown as dd.mm.yyyy 01:00. I would like them to be grouped by UTC time not localtime. But the main issue is that it is missing the activation on the 29.03.2015 23:55:00.
I suspect that filteredsummaries is grouping the resultset by my localtime and not utc. Is there a way to get the result that I want? Or is this a bug?