Skip to content

Hourly slots start at :30 for hosts in UTC+3:30 / +5:30 / +5:45 (Tehran, India, Nepal, Adelaide, Newfoundland) #182

Closed

Description

@MohammadHadi2031

Before submitting

  • I've searched existing issues and this isn't a duplicate.
  • This is a reproducible bug in Calnode — not a configuration/setup question or a feature request.

What's the bug?

alignUp (internal/slots/generate.go) rounds slot starts to multiples of the interval counted from the Unix epoch, i.e. on the UTC clock. For a host whose UTC offset is not a whole number of hours, every hourly boundary lands on :30 or :45 local time. A Tehran host working 09:00–17:00 with a 60-minute interval is offered 09:30, 10:30 … 15:30 and never 09:00. Intervals that don't divide a day (50 or 35 min) also drift from one day to the next, even for UTC hosts.

Steps to reproduce

Host timezone Asia/Tehran, Monday 09:00–12:00, duration and interval 60 → /slots offers 09:30 and 10:30 (expected 09:00, 10:00, 11:00).

Calnode version / commit

v0.11.2

How are you running Calnode?

Self-hosted — Docker

Logs, screenshots, or anything else

No response

Activity

  1. pullfrog commented on Oct 28, 2026

    @pullfrog
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions