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

Wrong calcutions for timestamps #75

Open
moonlightz opened this issue Feb 10, 2023 · 2 comments
Open

Wrong calcutions for timestamps #75

moonlightz opened this issue Feb 10, 2023 · 2 comments

Comments

@moonlightz
Copy link

Hi there.
It appears there is something wrong with time calculations between dates. It is, at least, the second time I have spotted this problem.

2 examples spotted between 09/02/2003 afterrnoon and 10/02/2023 morning:

há 31 diasI  nbound in sorting center Fenggang Town
 ^^^^^ 10/01/2023 10:24
há 30 dias  Accepted by carrier  
^^^^^ 10/01/2023 07:18
há 29 dias   Outgoing at the sorting center  Fenggang Town
^^^^^ 10/01/2023 02:29 
há 31 dias  Incoming at the sorting center  Fenggang Town
^^^^^ 10/01/2023 10:24
há 30 dias  Accepted by the carrier
^^^^^ 10/01/2023 07:18
há 31 dias  Waiting for seller to ship
^^^^^ 09/01/2023 10:59

I am not sure what function that site uses to calc the time but it is obviously not doing the correct calc between the published time and the current time..

There might be also a problem when the published time and current time is less than 1 hour, making the site saying "Within" or "Dentro de" and we can't obviously calc negative times.
There must be there another way to calc times.

@carlosflorencio
Copy link
Member

Hey @moonlightz, thanks for reporting.

Yeah the current date logic isn't great, the main issue should be the timezone set when parsing the date from the carrier website. Some carriers are from Asia, and I don't know the exact country timezone to use. Other issue can be when the site with the tracking info, supports multiple carriers from multiple countries, we don't have a good method to detect the right timezone for the dates.

Can you share your tracking ID so that I can take a look into that issue in particular?

Regards

@moonlightz
Copy link
Author

Just saw the reply now. It would be JA923927733PT. Yes, it would be probably the timezones.

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

No branches or pull requests

2 participants