Skip to content

Commit 62b5815

Browse files
committed
Fix test timezone
1 parent a945351 commit 62b5815

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

app/models/parsers/sep_csv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def parse_extra(row)
5050
elsif row["metatype"] == "Name"
5151
@profile_title = row["metadata"]
5252
elsif row["metatype"] == "Date"
53-
@start_time = Time.parse(row["metadata"]).utc
53+
@start_time = Time.zone.iso8601(row["metadata"])
5454
elsif row["metatype"] == "Roasting Date"
5555
@extra["roast_date"] = Date.parse(row["metadata"]).strftime("%Y-%m-%d")
5656
else

config/environments/test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,7 @@
6161

6262
# Raise error when a before_action's only/except options reference missing actions
6363
config.action_controller.raise_on_missing_callback_actions = true
64+
65+
config.time_zone = "UTC"
6466
end
6567
Rails.application.routes.default_url_options = {host: "visualizer.test", protocol: "https"}

test/files/pressensor_profile.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
information_type,elapsed,pressure,current_total_shot_weight,flow_in,flow_out,water_temperature_boiler,water_temperature_in,water_temperature_basket,metatype,metadata,comment
22
meta,,,,,,,,,Name,My espresso #438,text
3-
meta,,,,,,,,,Date,2023-04-07T07:02:31Z,ISO8601 formatted date
3+
meta,,,,,,,,,Date,2023-04-07T09:02:31Z,ISO8601 formatted date
44
meta,,,,,,,,,Roastery,Kávékalmár,text
55
meta,,,,,,,,,Beans,Ethiopia Banti Nenka,text
66
meta,,,,,,,,,Roast Color,Medium,text

test/files/pressensor_short_profile.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
information_type,elapsed,pressure,current_total_shot_weight,flow_in,flow_out,water_temperature_boiler,water_temperature_in,water_temperature_basket,metatype,metadata,comment
22
meta,,,,,,,,,Name,First Pull,text
3-
meta,,,,,,,,,Date,2023-06-26T19:49:15Z,ISO8601 formatted date
3+
meta,,,,,,,,,Date,2023-06-26T21:49:15Z,ISO8601 formatted date
44
meta,,,,,,,,,Roasting Date,2023-06-20,ISO8601 formatted date
55
meta,,,,,,,,,Roastery,Ninetens,text
66
meta,,,,,,,,,Beans,Kintamani Cascara Washed,text

test/files/profitec_victoria_arduino_profile.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
information_type,elapsed,pressure,current_total_shot_weight,flow_in,flow_out,water_temperature_boiler,water_temperature_in,water_temperature_basket,metatype,metadata,comment
22
meta,,,,,,,,,Name,Profitec/Victoria Arduino dual spring setup,text
3-
meta,,,,,,,,,Date,2023-03-24T08:38:52Z,ISO8601 formatted date
3+
meta,,,,,,,,,Date,2023-03-24T09:38:52Z,ISO8601 formatted date
44
meta,,,,,,,,,Roasting Date,2020-11-18,ISO8601 formatted date
55
meta,,,,,,,,,Roastery,Kavekalmar,text
66
meta,,,,,,,,,Beans,Brasil Cerrado Mineiro,text

0 commit comments

Comments
 (0)