A small service builds an event summary by local calendar days in a given time zone. After a recent change, the results became unstable around the day boundary and when the same set of events is passed again in a different order.
EventWindowRollup#rollup method accepts:
events — an array of hashes with :id, :occurred_at, :value keys;zone: — a string IANA time zone identifier, for example Europe/Berlin;start_at: and end_at: — Time objects defining the half-open interval [start_at, end_at) in UTC.occurred_at falls within the specified half-open interval must be included in the result.{ date: "YYYY-MM-DD", count: Integer, total_value: Integer, ids: Array<String> }.date in ascending order.events array must not change the set of groups or numeric aggregates.ruby demo.rb
Europe/Berlin during daylight saving time.start_at and on/after end_at are not included in the summary.zone, not just a fixed offset from UTC.3.3ruby demo.rbTime#getlocal with an IANA identifier, for example Europe/BerlinUse line comments to explain the problem, its impact, the fix and how to test it.