Skip to content

Documentation incorrect for GET /users/{username}/activity/current #101

@Eldemarkki

Description

@Eldemarkki

The documentation specifies that the GET request to /users/{username}/activity/current always specifies that the started field is in UTC time (by including the Z at the end):

{
    "started": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
    "duration": "10",
    "heartbeat": {
        "language": "c",
        "hostname": "hostname1",
        "editor_name": "Neovim",
        "project_name": "cool_project22"
    }
}

However, in reality that "Z" is not included. Here is an example response that I got:

{
  "started": "2023-12-17T12:03:20.938417739",
  "duration": 240,
  "heartbeat": {
    "project_name": "testaustime-frontend",
    "language": "typescript",
    "editor_name": "vscode",
    "hostname": "ideapad"
  }
}

I believe the same problem exists for all other timestamps that are returned from any endpoint. We already have an issue in the frontend for this, but I think it would be best to fix in the backend.

Also, it seems that the duration field is a number instead of a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions