Code Monkey home page Code Monkey logo

Comments (4)

vincent-pochet avatar vincent-pochet commented on May 18, 2024

Hello @prognostikos,
Thank you for your raising this point.

Indeed for now Lago is handling events using the timestamp field which is supposed to be an UTC value.

A proper way to address your issue would be to store a timestamp_in_customer_timezone along with the actual timestamp and to adapt the billing and aggregation logic to use this field.
This change is not in our short term roadmap, but we are taking it into account for future iteration as you are certainly not the only user with this concern.

In the meantime, a workaround for you could be to add the timezone difference in the timestamp field sent in the event payload. Do you think this could do the job for now?

from lago.

prognostikos avatar prognostikos commented on May 18, 2024

@vincent-pochet making sure the timestamp is always a UTC value partially works.

Isn't it the case that if fees are always calculated early in the first day of the month UTC it will exclude events that from the customers point of view should be included if the customer timezone has a negative UTC offset? I think Lago will have already calculated the fee for that month even if more events come in on the same day for the customer's timezone. And it would be the same for events at the beginning of the month if the customer timezone has a positive UTC offset.

To support this feature I think that Lago would have to try to bill every hour for subscriptions / customers where the billing period in their timezone starts in that hour.

from lago.

prognostikos avatar prognostikos commented on May 18, 2024

Another option would be to make the day of the month where the fees are calculated configurable so that there is a long enough delay between event receipt and fee calculation - today we actually bill on the 4th for activities in the previous month. We are planning to reduce that but it wouldn't be a problem to wait 1 day or however many hours it would take to cover all customers.

from lago.

vincent-pochet avatar vincent-pochet commented on May 18, 2024

@prognostikos Sorry for the late answer on this topic.
Indeed, I think the easiest way to support this for now would be to change the default billing day or to make it editable. We are discussing it internally and we will come up with a solution soon.

Thank you for your patience.

from lago.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.