Skip to content

Bug: date-time miscalculation in "HHhMMmSSs ago" #1007

Open
@Marcool04

Description

@Marcool04

TLDR: The interval provided as x in the "HHhMMmSSs ago" field can be miscalculated

  1. Is this urgent: No
  2. DNS provider(s) you use: OVH
  3. Program version: 2.9.0 (from AUR package https://aur.archlinux.org/packages/ddns-updater )
  4. What are you using to run the container: native compilation and execution
  5. Extra information:

On the following screenshot, notice how both the "no IP change for x" differ (and point to the correct time, see updates.json below), but "HHhMMmSSs ago" intervals are identical when they shouldn't be:

Image

updates.json:

{
  "records": [
    {
      "domain": "[hidden]",
      "owner": "@",
      "ips": [
        {
          "ip": "[hidden]",
          "time": "2025-04-21T18:10:44.391977471+02:00"
        },
        {
          "ip": "[hidden]",
          "time": "2025-06-15T12:45:21.789458327+02:00"
        }
      ]
    }
  ]
}

config.json:

{
  "settings": [
    {
      "provider": "ovh",
      "domain": "[hidden]",
      "username": "[hidden]",
      "password": "[hidden]",
      "ip_version": "ipv4",
      "ipv6_suffix": ""
    },
    {
      "provider": "ovh",
      "domain": "[hidden]",
      "mode": "api",
      "api_endpoint": "ovh-eu",
      "app_key": "[hidden]",
      "app_secret": "[hidden]",
      "consumer_key": "[hidden]",
      "ip_version": "ipv6",
      "ipv6_suffix": ""
    }
  ]
}

Host OS: Arch linux (up to date rolling release OS).

The problem is likely in this function:

func checkHistoryEvents(events []models.HistoryEvent) (err error) {
but I can't really see how this might happen to be honest...

Thanks for the very useful little tool anyhow 👍️

Cheers,

Mark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions