chronomodel icon indicating copy to clipboard operation
chronomodel copied to clipboard

The 'as_of_time' value for historical objects is inaccurate and may lead to unintended consequences

Open tagliala opened this issue 9 months ago • 0 comments

Same issue as #283, since as_of_time is an alias of valid_to in historical objects, but may have different effects

> country.history.first.validity
  Country::History Load (1.2ms)  SELECT "history"."countries".* FROM "history"."countries" WHERE "history"."countries"."id" = $1 ORDER BY lower(validity) ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
=> 2024-04-14 07:33:14.750087 UTC...2024-04-14 07:35:30.80794 UTC
country.history.first.as_of_time
  Country::History Load (1.3ms)  SELECT "history"."countries".* FROM "history"."countries" WHERE "history"."countries"."id" = $1 ORDER BY lower(validity) ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
=> 2024-04-14 07:35:30.80794 UTC

2024-04-14 07:35:30.80794 UTC IS NOT included in the validity range of country

tagliala avatar May 05 '24 20:05 tagliala