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

Entered time is being overwritten #401

Closed
moveson opened this issue Aug 30, 2020 · 0 comments
Closed

Entered time is being overwritten #401

moveson opened this issue Aug 30, 2020 · 0 comments
Labels

Comments

@moveson
Copy link
Collaborator

moveson commented Aug 30, 2020

This isn't broken per se, but something in the chain is taking a perfectly good entered_time timestamp and replacing it with a military time without any date or timezone information. Looks like it is the same process that sets data_status and lap. Below is output from four Version objects for a single example from a recent event. The unwanted behavior happens in the third step.

irb(main):012:0> versions.each { |version| pp version.attributes }; nil

# Step 1
{"id"=>290813,
 "item_type"=>"RawTime",
 "item_id"=>46667,
 "event"=>"create",
 "whodunnit"=>"701",
 "object"=>nil,
 "created_at"=>Sat, 15 Aug 2020 20:09:52 UTC +00:00,
 "object_changes"=>
  {"id"=>[nil, 46667],
   "event_group_id"=>[nil, 295],
   "split_name"=>[nil, "Towers 3"],
   "bitkey"=>[nil, 1],
   "bib_number"=>[nil, "611"],
   "entered_time"=>[nil, "2020-08-15 14:09:17-6:00"],
   "source"=>[nil, "ost-remote-1831D2F1-7A01-4A09-9A13-8CB78421F15D"],
   "created_by"=>[nil, 701],
   "updated_by"=>[nil, 701],
   "created_at"=>[nil, "2020-08-15T20:09:52.876Z"],
   "updated_at"=>[nil, "2020-08-15T20:09:52.876Z"],
   "parameterized_split_name"=>[nil, "towers-3"],
   "sortable_bib_number"=>[nil, 611],
   "matchable_bib_number"=>[nil, 611]}}

# Step 2
{"id"=>290814,
 "item_type"=>"RawTime",
 "item_id"=>46667,
 "event"=>"update",
 "whodunnit"=>nil,
 "object"=>
  {"event_group_id"=>295,
   "entered_lap"=>nil,
   "lap"=>1,
   "absolute_time"=>nil,
   "entered_time"=>"2020-08-15 14:09:17-6:00",
   "id"=>46667,
   "created_by"=>701,
   "split_name"=>"Towers 3",
   "parameterized_split_name"=>"towers-3",
   "bib_number"=>"611",
   "sortable_bib_number"=>611,
   "matchable_bib_number"=>611,
   "data_status"=>nil,
   "bitkey"=>1,
   "source"=>"ost-remote-1831D2F1-7A01-4A09-9A13-8CB78421F15D",
   "split_time_id"=>nil,
   "with_pacer"=>false,
   "stopped_here"=>false,
   "pulled_by"=>nil,
   "pulled_at"=>nil,
   "updated_by"=>701,
   "created_at"=>"2020-08-15T20:09:52.876Z",
   "updated_at"=>"2020-08-15T20:09:52.876Z",
   "remarks"=>nil,
   "disassociated_from_effort"=>nil,
   "effort_id"=>46925,
   "effort_last_name"=>"Hanback",
   "event_id"=>301,
   "split_id"=>352,
   "split_time_exists"=>nil},
 "created_at"=>Sat, 15 Aug 2020 20:09:52 UTC +00:00,
 "object_changes"=>
  {"lap"=>[nil, 1],
   "absolute_time"=>[nil, "2020-08-15T20:09:17.000Z"],
   "updated_at"=>["2020-08-15T20:09:52.876Z", "2020-08-15T20:09:52.923Z"]}}

# Step 3
{"id"=>290815,
 "item_type"=>"RawTime",
 "item_id"=>46667,
 "event"=>"update",
 "whodunnit"=>nil,
 "object"=>
  {"split_time_id"=>nil,
   "id"=>46667,
   "event_group_id"=>295,
   "split_name"=>"Towers 3",
   "bitkey"=>1,
   "bib_number"=>"611",
   "absolute_time"=>"2020-08-15T20:09:17.000Z",
   "entered_time"=>"2020-08-15 14:09:17-6:00",
   "with_pacer"=>false,
   "stopped_here"=>false,
   "source"=>"ost-remote-1831D2F1-7A01-4A09-9A13-8CB78421F15D",
   "pulled_by"=>nil,
   "pulled_at"=>nil,
   "created_by"=>701,
   "updated_by"=>701,
   "created_at"=>"2020-08-15T20:09:52.876Z",
   "updated_at"=>"2020-08-15T20:09:52.923Z",
   "parameterized_split_name"=>"towers-3",
   "remarks"=>nil,
   "sortable_bib_number"=>611,
   "data_status"=>nil,
   "matchable_bib_number"=>611,
   "disassociated_from_effort"=>nil,
   "entered_lap"=>nil,
   "lap"=>1,
   "split_time_exists"=>false,
   "effort_id"=>46925,
   "effort_last_name"=>"Hanback",
   "event_id"=>301,
   "split_id"=>352},
 "created_at"=>Sat, 15 Aug 2020 20:09:52 UTC +00:00,
 "object_changes"=>
  {"entered_time"=>["2020-08-15 14:09:17-6:00", "14:09:17"],
   "updated_at"=>["2020-08-15T20:09:52.923Z", "2020-08-15T20:09:52.995Z"],
   "data_status"=>[nil, "good"],
   "lap"=>[nil, 1],
   "split_time_exists"=>[nil, false]}}

# Step 4
{"id"=>290817,
 "item_type"=>"RawTime",
 "item_id"=>46667,
 "event"=>"update",
 "whodunnit"=>nil,
 "object"=>
  {"split_time_id"=>nil,
   "id"=>46667,
   "event_group_id"=>295,
   "split_name"=>"Towers 3",
   "bitkey"=>1,
   "bib_number"=>"611",
   "absolute_time"=>"2020-08-15T20:09:17.000Z",
   "entered_time"=>"14:09:17",
   "with_pacer"=>false,
   "stopped_here"=>false,
   "source"=>"ost-remote-1831D2F1-7A01-4A09-9A13-8CB78421F15D",
   "pulled_by"=>nil,
   "pulled_at"=>nil,
   "created_by"=>701,
   "updated_by"=>701,
   "created_at"=>"2020-08-15T20:09:52.876Z",
   "updated_at"=>"2020-08-15T20:09:52.995Z",
   "parameterized_split_name"=>"towers-3",
   "remarks"=>nil,
   "sortable_bib_number"=>611,
   "data_status"=>"good",
   "matchable_bib_number"=>611,
   "disassociated_from_effort"=>nil,
   "entered_lap"=>nil,
   "lap"=>1,
   "split_time_exists"=>false,
   "effort_id"=>46925,
   "effort_last_name"=>"Hanback",
   "event_id"=>301,
   "split_id"=>352},
 "created_at"=>Sat, 15 Aug 2020 20:09:53 UTC +00:00,
 "object_changes"=>
  {"split_time_id"=>[nil, 338875],
   "updated_at"=>["2020-08-15T20:09:52.995Z", "2020-08-15T20:09:53.030Z"]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant