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. Timezones When Scheduling Firmware Activation

Timezones when scheduling firmware activation

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 AndreasAtPowel , 1 October, 2019
Forums
Gurux.Net

We are trying to schedule a firmware activation in Star meters.
The system running our code currently runs in UTC+2 (Swedish summer time)
The meters runs in UTC+1 (Swedish normal time)
So we adjust the time to match the meters timezone like:
Ex.
var normalTime = firmwareInformation.ScheduleTime.Value.ToUniversalTime().AddSeconds(utcDiffSec);
var activateTime = new DateTimeOffset(normalTime.Year, normalTime.Month, normalTime.Day, normalTime.Hour, normalTime.Minute, normalTime.Second, normalTime.Millisecond, TimeSpan.FromSeconds(utcDiffSec));

var activationSchedule = new GXDLMSActionSchedule(scheduleLogicalName) { ExecutionTime = new[] { new GXDateTime( activateTime ) } };

utcDiffSec in this case is meters UTC offset in seconds (+3600).

When examining the GXDateTime object you can see that Value (that is a DateTimeOffset object) contains three DateTime properties:
- UtcDateTime which is the UTC time of what we entered, that is normalTime - utcDiffSec
- DateTime that contains the time we entered (normalTime)
- LocalDateTime which is a calculated value matching the systems timezone, DateTimeKind.Local

When this is sent to meter it seems that it is the LocalDateTime that is sent, and consequently meter schedules one hour to late in this example.

Shouldn't it be the DateTime object that should be sent? Or what are we doing wrong? As it is now we have to do a lot of manipulation to adjust for this, since there are no requirements in what timezone system should run, all we know is the timezone of the meter.

Profile picture for user Kurumi

Kurumi

6 years 10 months ago

Hi,

Hi,

The Execution time of Single Action Schedule is sent in two parts, Date and time. The problem here is that deviation or DST flag is not sent. This causes that execution time must use the same time zone and DST what meter is using and the system time zone is ignored.

You can just skip time zone info and set the time that you want to use. Don't try to change date time value to the different time zone.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • Thomasqto
  • Uka Ibe
  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin