Skip to content

[REFACTOR]: improve date handling of activity api #754

@jon4hz

Description

@jon4hz

What to refactor

At the moment, the timed API for starting and stopping activities takes a date, from-time and to-time as input. The date contains only a day like 2025-06-06 and the from-time and to-time contain a timestamp without date.

Why refactor it

The activity API should be able to handle tasks that end on a different day than they were started.
Currently, the frontend somehow handles this gracefully. Without going through the code, I'd assume it stops the activity at 23:59:59 and starts a new activity for the next day.

However, that seems a bit like a workaround. And every third party client that interacts with the activity API has to reimplement that logic.

How to refactor it

I think it would make sense to refactor this so from-time and to-time are both ISO 8601 timestamps, containing a date and time. That makes it easier to handle activities that are stopped on the next day.

Required

  • I have checked past issues to ensure that this isn't a duplicate.

Metadata

Metadata

Assignees

Labels

backendThis issue or pull request is backend relatedrefactorThis issue or pull request discusses refactoring

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions