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. Correct Way To Set GXDate/GXTime/GXDateTime

Correct way to set GXDate/GXTime/GXDateTime

By jr.gomez , 23 May, 2024
Forums
Gurux.DLMS

Hello,

I just started with you Python library. I'm trying to set some DateTime for a "Single action schedule" (class_id = 22) and can't find a correct way to set those. If i use the "Datetime" python format is OK, something like this:

"GXDateTime(datetime(1900, 1, 1, 0, 0, 0, 0), datetime)"

This limits me since i can't set anything that falls outside of this format, like:
* Don't care values.
* Last day of month/year.
* Anykind of dayofWeek.

So, is there a way to set those to make it work with the schedule class ID? Thank you in advance.

PS: I've been doing some research in those classes and found out that the base class, GXDateTime, sets dayofWeek to 0 at start and never uses again, so maybe can't work.

Profile picture for user Kurumi

Kurumi

2 years ago

Hi, You can set the last day…

Hi,

You can set the last day of the month like this:

GXDateTime("LASTDAY/*/* 01.00.00")

You need to use the correct date-time format, but the idea is this.

Most meters don't use dayofWeek and that is not used as a default because it's causing problems with existing meters. If you want to use it you must set it.

BR,
Mikko

jr.gomez

2 years ago

Thank you for the answer,…

Thank you for the answer, Mikko. I'll give a try on Monday.

For weekofDay, i think is easier for us to allow 0 as a wildcard instead of modifying python library.

Greetings,
J.R. Gómez

Profile picture for user Kurumi

Kurumi

2 years ago

Hi, If you don't set…

Hi,

If you don't set weekofDay wildcard value is used.

BR,
Mikko

jr.gomez

2 years ago

Hey Mikko, Just saw it…

Hey Mikko,

Just saw it yesterday. From here, we can work fine.

Thanks for the help!

Greetings,
J.R. Gómez

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin