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

Missing data due to time Zone #9

Open
advinay opened this issue Mar 2, 2021 · 1 comment
Open

Missing data due to time Zone #9

advinay opened this issue Mar 2, 2021 · 1 comment

Comments

@advinay
Copy link

advinay commented Mar 2, 2021

When running an extraction from Stitch for customer database (for example), bookmark will be updated according to most recent "updated_at" value.
But this value is in EST time, and the bookmark will store it with a "Z" in the end, so in UTC

This leads to strong discrepencies ;

The only way to ensure data is correct, is to manually change start date to 2 days ago. And redo that every day ...

image

I think this old post was right, but nothing was made to resolve it ; can anyone help ?

From Recharge Support

our DB is in EST time zone and when you add Z at the end you are moving time zone to UTC so you open 4 hour gap I believe

Originally posted by @Brobin in #1 (comment)

@robindebois
Copy link

robindebois commented May 1, 2021

@advinay I'm not entirely sure if I understand where this fails. After processing all the pages the last updated_at is stored in the bookmarks. Where would this go wrong?

  • imagine the last update from the API is 2021-04-15T15:00:00 (in EST, implicitly).
  • because of lack of timezone awareness, it seems to me this is converted to UTC and so ends up as 2021-04-15T15:00:00Z.
  • the code however doesn't use the time when it passes it, it takes [0:10] of the bookmark string, which is just the date, in my example would be 2021-04-15 :
    params[bookmark_query_field] = last_datetime[0:10] # last_datetime date

When I run it in stitch this is the log (Example):

2021-05-01 13:53:03,146Z    tap - INFO URL for addresses: https://api.rechargeapps.com/addresses?limit=100&updated_at_min=2021-05-01&page=1```

I don't see how it would "skip" updates. Am I missing something?

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