Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Passive Relay Time Date-format Conversion

Passive Relay Time date-format conversion

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Vishal Patel , 9 February, 2021
Forums
General discussion

Hi Mikko,

I am reading from IS15959-2 meter and using libguruxdlmsc C Library.

OBIS Code: 1.0.96.128.30.255 (Passive Relay Time)
Attribute-Index: 2
Object-type: DLMS_OBJECT_TYPE_DATA

I'm reading this from meter. Meter responding properly. I'm facing issue in conversion.

DLMS_OBJECT_TYPE_DATA response is of structure-type. from obj_toString() API, I'm getting below response:
Received value -> Index: 2 Value: [300, 1800, 4, 07 E6 0C 0B FF 10 39 00 FF 01 4A 00]

But I need response something like;
Expected value -> Index: 2 Value: [300,1800,5,"8/1/2022 11:00:00 AM"]

Can you plz help me, where and what I can change in DLMS-C-Library or outside of DLMS-C-Library to get the desired output?

Regards,
Vishal PATEL

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi,

Hi,

Date-time is sent as octet-string in DLMS. Because there is no way to find out that this is a date-time, you need to modify obj_toString and change the received byte array to date-time using the dlms_changeType -method.

BR,
Mikko

Vishal Patel

5 years 4 months ago

Hi Mikko,

Hi Mikko,

Meter RTC Timezone is -> Index: 3 Value: 330

I'm able to convert to below value for Passive Relay Time
Index: 2 Value: [300, 1800, 4, 12/11/2022 16:57:00 UTC--05:-30]

How can I convert from Utc to Normal time as similar APIs present in C# library but couldn't fine in ANSI C library ?
Index: 2 Value: [300,1800,5,"8/1/2022 11:00:00 AM"]

Regards,
Vishal

Profile picture for user Kurumi

Kurumi

5 years 4 months ago

Hi Vishal,

Hi Vishal,

open gxignore.h and un-comment DLMS_USE_UTC_TIME_ZONE. You can read more from this:
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSClock#deviation

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin