Skip to content

Conversation

@kan-fu
Copy link
Collaborator

@kan-fu kan-fu commented Jul 13, 2025

Partially fix #60

Besides the standard "YYYY-MM-DDTHH:MM:SS.SSSZ", the backend also supports "YYYY-MM-DD" and ISO 8601 duration format like "PT1M". This Pr does not fix the duration format. so this works

onc.getRawdata(
    {
        "deviceCategoryCode": "ACOUSTICTRANSPONDER",
        "dateFrom": "2025-04-01T23:59:00.000Z",
        "dateTo": "2025-04-02",
        "locationCode": "BACSG.AT1",
        "rowLimit":"3",
    },
    allPages=True,
)

but this does not work

onc.getRawdata(
    {
        "deviceCategoryCode": "ACOUSTICTRANSPONDER",
        "dateFrom": "2025-04-01T23:59:00.000Z",
        "dateTo": "PT1M",
        "locationCode": "BACSG.AT1",
        "rowLimit":"3",
    },
    allPages=True,
)

In fact getScalardata changes those datetimes to the standard format

onc.getScalardata(
    {
        "deviceCategoryCode": "ACOUSTICTRANSPONDER",
        "dateFrom": "2025-04-01T23:59:00.000Z",
        "dateTo": "PT10M",
        "locationCode": "BACSG.AT1",
        "rowLimit":"3",
    },
    allPages=True,
)

getRawdata should also do that. I will ask the developer to fix it.

I also changed the default value of showWarning to False. This is requested by our internal manager. Our backend gives some unexpected warnings, which confuses users. Turning it off until the issue is fixed.

@kan-fu kan-fu self-assigned this Jul 13, 2025
@kan-fu kan-fu merged commit 5bbb4da into main Jul 13, 2025
6 checks passed
@kan-fu kan-fu deleted the issue-60-ignore-timezone branch July 13, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multipage throws an error when the dateTo is in the format of "YYYY-MM-DD"

2 participants