Hi, i have been trying to set meter clock, i'm using below code to set meter:
GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
GXDateTime time = new GXDateTime(new Date());
clock.setTime(d);
readDataBlock(dlms.write(clock, 2), reply);
Object val = read(clock, 2);
below is the hex
TX: 10:35:03.471 00 01 00 05 00 01 00 1B C1 01 C1 00 08 00 00 01 00 00 FF 02 00 09 0C 07 E8 05 1D 03 0A 23 01 23 FE B6 00
RX: 10:35:06.249 00 01 00 01 00 05 00 04 C5 01 C1 00
TX: 10:35:06.778 00 01 00 05 00 01 00 0D C0 01 C1 00 08 00 00 01 00 00 FF 02 00
RX: 10:35:08.322 00 01 00 01 00 05 00 12 C4 01 C1 00 09 0C 07 E8 05 1D 03 0A 23 03 FF FF 4C 00
issue that i'm facing is, i'm in IST and whenever i set the time, it sets the meter with IST time instead of UTC and whenever i read the time from meter, meter is returning time in IST but the GXDateTime Class is somehow changing that to 2:30 hour forward.
currently meter has timezone set to -180. So i am assuming it is adding 2:30 hour to manage timezone, but i am not reading timezone from meter so, how GXDateTime is managing that?
also, what i want to achieve is to set UTC time at meter and assign -180 to timezone to set meter clock to follow KSA timezone.
thanks,
Hi, Your meter is using…
Hi,
Your meter is using different deviation that DLMS standard defines.
You need to set this:
client.UtcTimeZone = true;
You can read more here:
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSClock
BR,
Mikko
Hi Mikko, i tried setting…
Hi Mikko,
i tried setting the flag, i'm still having similar issue
GXDateTime that i'm setting = 30/5/24 10:45:57 AM
GXDateTime that i'm getting from meter = 30/5/24 7:16:01 PM
below are the hex messages exchanged:
TX: 10:46:10.760 00 01 00 05 00 01 00 1B C1 01 C1 00 08 00 00 01 00 00 FF 02 00 09 0C 07 E8 05 1E 04 0A 2D 39 00 01 4A 00
RX: 10:46:15.211 00 01 00 01 00 05 00 04 C5 01 C1 00
TX: 10:46:16.689 00 01 00 05 00 01 00 0D C0 01 C1 00 08 00 00 01 00 00 FF 02 00
RX: 10:46:19.510 00 01 00 01 00 05 00 12 C4 01 C1 00 09 0C 07 E8 05 1E 04 0A 2E 01 FF FF 4C 00
Hi, Your meter and your PC…
Hi,
Your meter and your PC are a different time zone. Your PC time zone is added to the date-time when you update the time. If you write IST time the time zone is UTC + 5:30.
Your meter is UTC+3:00. For this reason the is a 2:30 difference.
BR,
Mikko