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. GXDateTIme

GXDateTIme

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 tirpromaut , 27 July, 2017
Forums
Gurux DLMS for Java

Hi.
My Timezone is UTC0. Timezone in meter too is 0. Daylight Savings enable with deviation 60. LED Meter time and meter time in Gurux DLMS direction is 2017-07-27 1:17:38. But when I read meter time , I receive value 3 hours smaller

GXDLMSObjectCollection clockreg = objects.getObjects(ObjectType.CLOCK);
GXDLMSObject it1 = clockreg.findByLN(ObjectType.CLOCK, "0.0.1.0.0.255");
it1.setDataType(2, DataType.DATETIME);
GXDateTime clock = null;
clock = (GXDateTime) readObject(it1, 2);

System.out.println("...............................................");
System.out.println(clock.toString() );
System.out.println(clock.getValue());
System.out.println(new Timestamp(clock.getMeterCalendar().getTimeInMillis()));
System.out.println(clock.toLocalTime());
System.out.println(clock.toMeterTime());

------------------
console out:
...............................................
18.08.17 20:27:29
Thu Jul 27 02:19:29 UTC 2017
2017-08-18 20:27:29.0
Fri Aug 18 20:27:29 UTC 2017
Fri Aug 18 20:27:29 UTC 2017

How can i get correct display meter time? Why such different results?

Image
Profile picture for user Kurumi

Kurumi

8 years 10 months ago

GXDateTIme

Hi,

Can you get reply bytes from clock read (just last line) and post them here.
Give also current time.

I can check this.

BR,

Mikko

tirpromaut

8 years 10 months ago

GXDateTIme

<- 07:10:15.670 7E A0 14 00 02 62 CB 21 94 BE 59 E6 E6 00 05 01 02 2B C8 F7 1E 7E
-> 07:10:15.756 7E A0 20 21 00 02 62 CB 78 E7 44 E6 E7 00 0C 01 00 09 0C 07 E1 07 1B 04 0A 02 08
FF 80 00 80 A8 7D 7E

tirpromaut

8 years 10 months ago

GXDateTIme

I downloaded the new version from github and it works

Profile picture for user Kurumi

Kurumi

8 years 10 months ago

GXDateTIme

Hi,

Your meter is not using time zone, but summer time is enabled.
Thanks from let me know from this. There was issue if time zone was not used, but summer time was set.
Hi,

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