News:

  • May 30, 2026, 04:58:17 PM

Login with username, password and session length

Author Topic: EPOCH & 2038: Long Term Plans  (Read 6196 times)

Mike@Forshock

  • Sr. Member
  • ****
  • Posts: 58
EPOCH & 2038: Long Term Plans
« on: August 16, 2021, 04:59:55 PM »
So, recently was updating a few pieces of code to add data/time comparison and came across something that may seem to be a non-issue but may for certain systems. While many of us may hope customers replace equipment every few years; five, ten, etc.
It got me curious though:

What happens when we hit the 1938 problem with systems running these reliable controllers?

https://en.wikipedia.org/wiki/Year_2038_problem


franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3826
    • Host Engineering
Re: EPOCH & 2038: Long Term Plans
« Reply #1 on: August 16, 2021, 05:24:45 PM »
Minimally, with the current architecture, a firmware update could utilize a Jan 1, 2000 epoch value (vs. Jan 1, 1970) and push that date out another 30 years to 2068.

If by then and we start supporting double precision floating point values, Jan 1, 1970 epoch can give you a huge range, both in terms of years but also precision timing (e.g. July 4, 2076, 12:34:56.789012)

Mike@Forshock

  • Sr. Member
  • ****
  • Posts: 58
Re: EPOCH & 2038: Long Term Plans
« Reply #2 on: August 16, 2021, 05:36:22 PM »
That is what I gathered, it would be a series of firmware updates to get a solution.

Was just thinking about as I am working on an old DirectLogic system from 2000... 21 years and rock solid, so got me thinking about it.
Would only be concerned for a few things, as the EPOCH is (currently) a 32-bit signed and within the structures we use EPOCH (Last Updates) with then get passed to a modbus register.  This would obviously get to be a mess quickly without a little planning in advance.

Thanks for the update

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3826
    • Host Engineering
Re: EPOCH & 2038: Long Term Plans
« Reply #3 on: August 16, 2021, 08:41:03 PM »
As you probably realize, Do-more PLCs are less than 0.0001% of the devices out there that have the 2038 issue.  We will just follow the crowd - my post was potential "fixes", which may or may not be implemented (it may be something completely different than these two).  I.e., don't plan on anything until the rest of the world decides what the best solution is.  There's about 10-15 years before something "gels".