On a client, there are 2 DMA agents, both running version: DataMiner (10.4.0.0-14637-CU5)
Our client asks us why in Dataminer, on the Surveyor>Element>General>System Time, they have the right date, but not the right time, regarding the same element.
If they check the element´s GUI, it is possible to see the right time/date under System Time.
So it seems that Dataminer is getting that parameter, but keeps the right date, but takes -6 hours to the element time.
Both DMA and Element have different NTP servers, however, DMA shows the right time.
Element is an Ateme Encoder, AS2204, Protocol:
Target Device: Ateme Kyrion
Device Type: Encoder
Current Version: 1.0.1.3_Test
Integration ID: DMS-DRV-0780
Ownership: Name : Skyline Communications NV
When I check the element´s(encoder) GUI, I´m able to see that its NTP confg. has a GMT Offset check:
GMT offset
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
And the difference I see between DMA and Element´s GUI is 6h, could it be that DMA is taking that check and taking 6h from the right time?
Hi Adolfo,
Could it be that the device is in the UTC-6 time zone?
We have seen some occurrences where the device's UI displays information in local time, but its API, which DataMiner uses to poll data, is configured to respond in UTC.
In those cases, the date and time you see in DataMiner will also be in UTC and not local time, and an indication of such a thing is usually added to the subtext of the parameter.
Thks and sorry for the delay. We found (with the help of Skyline´s engineers) that a QAction in the protocol was root of the issue:
<!–<QAction id="53" encoding="JScript" triggers="1401">
<![CDATA[
var iTime = (id:1401)*1000;
var d = new Date();
d.setTime(iTime);
var strDate = d.getDate();
var strMonth = d.getMonth()+1;
var strYear = d.getFullYear();
var strHours = d.getHours();
var strMinutes = d.getMinutes();
var strSeconds = d.getSeconds();
if (strDate < 10)
strDate = "0" + strDate;
if (strMonth < 10)
strMonth = "0" + strMonth;
if (strMinutes < 10)
strMinutes = "0" + strMinutes;
if (strSeconds < 10)
strSeconds = "0" + strSeconds;
id:1400 = strDate + "/" + strMonth + "/" + strYear + " " + strHours + ":" + strMinutes + ":" + strSeconds;
]]>
</QAction>–>
So, that QAction was commented and replaced by:
<QAction id="53" name="System Time" encoding="csharp" triggers="1401"><![CDATA[
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Globalization;
using Skyline.DataMiner.Scripting;
public class QAction
{
/// <summary>
/// System Time
/// </summary>
/// <param name="protocol">Link with Skyline Dataminer</param>
public static void Run(SLProtocol protocol)
{
long lTime = Convert.ToInt64(protocol.GetParameter(1401));
DateTime dtSystemDate = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddSeconds(lTime);
TimeZone localZone = TimeZone.CurrentTimeZone;
DateTime current = DateTime.Now;
//TimeSpan currentDifference = localZone.GetUtcOffset(current);
//dtSystemDate = dtSystemDate.Add(currentDifference);
DaylightTime dayLight = localZone.GetDaylightChanges(current.Year);
dtSystemDate = dtSystemDate.Add(dayLight.Delta);
protocol.SetParameter(1400, dtSystemDate.ToString("dd/MM/yyyy HH:mm:ss"));
}
}
]]>
</QAction>
That happen in protocol: Ateme 1.1.0.4