Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Different times will return data with different structures. #486

Closed
1 task done
JasonLuuk opened this issue Mar 8, 2024 · 6 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@JasonLuuk
Copy link
Contributor

Contact Details

[email protected]

What happened?

A bug happened!
If you search for emission data for a partial date, e.g. =2021-04-27&toTime=2021-04-28", the returned data starts at 23:00 of the previous day that first day, and ends at 22:00 of the last day.
image

If you search for emission data for during these days, e.g. =2021-03-27&toTime=2021-03-28", the returned data starts at 0:00 of the first day, and ends at 23:00 of the last day.
image

The data source I use is electronic maps.

client

WebAPI (Default)

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@JasonLuuk JasonLuuk added the bug Something isn't working label Mar 8, 2024
@danuw
Copy link
Collaborator

danuw commented Mar 11, 2024

Hi @JasonLuuk is it possible to have a bit more information here please? I looks like you are experiencing a 1 hour shift which may be timezone related?
Where are you based please? You might need to specify the time in your request (taking into account your timezone)

@JasonLuuk
Copy link
Contributor Author

Sorry, I didn't realise about it maybe related to the time zone, I'm base in UK right not, GMT time, could you tell me how to add the time zone to the query statement if possible? @danuw

@danuw
Copy link
Collaborator

danuw commented Mar 13, 2024

No worries.

You will need to convert to UTC format and pass in like that 2022-03-01T00:00:00Z to 2022-03-01T23:59:00Z ( I usually use that delta)

Can you try and let us know? (what client are you using please?)

@JasonLuuk
Copy link
Contributor Author

@danuw thankyou very much, I'm using webapi and if I use your method, the data will be returned correctly from 0:00 of the day. So is there no way to continue the query without writing T00:00:00Z?

@danuw
Copy link
Collaborator

danuw commented Mar 19, 2024

Hi no currently this is how this is implemented. If that is how you need it, you could keep that time part hardcoded and only provide the date part ? (keeping the difference to match whatever timezone you are targetting)

@danuw
Copy link
Collaborator

danuw commented Mar 19, 2024

Will close this issue, but feel free to carry on asking question or opening a discussion on how to update and why...

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants