Hrv4training results off by one day

"Hi Samantha

Thank you for your message and for letting us know about this issue. We’ll investigate what is happening and if we can resolve the issue we’ll incorporate that into the next update of the app.

All the best.
Daniel"

Hope it doesn’t take too long. :slight_smile:

1 Like

Would be handy if they documented that file. It is also different on Android and iOS.

Have you asked them to?

6 months later and they still haven’t fixed it. :frowning: I have a new phone and still the same problem.

So I’m thinking, when I’ve got more time and not pneumonia, I could write a tiny dropbox script that detects when the HRV4Training file changes, copies it and corrects the last day.
Does anyone have experience writing dropbox scripts?

1 Like

I recently got into this situation myself when I was coding the Apple Health Sync for Sleep data. Apple Health also records the date/time in UTC and expects the developer to correct it for the local timezone. I too got caught in this situation where I was getting it wrong. (Similar to you, it’s worst when the data goes from before midnight to after midnight)

I also didn’t know one can do “dropbox script”.

But I think for the most part, the Weirdest thing is that, why it opted to increment the day. I would have expected the date to be BOTH at 26th, but just the time increased. (like below) cos if both Dates are still in UTC, they should still be on the 26th!

2023-26-02 09:58 72.93406788697360 822.66081871345
2023-26-02 10:36 77.52559907104400 773.9379084967320

edit: I just exported today mornig’s reading

date,timestamp_measurement
2023-10-06 00:01:00 +0000,2023-10-06 05:56:33 +0000,

the format of the file is wildly different from yours. Mine seems to be correct. the timestamp is indeed localtime even tho it states +0000. I really did take measurment at ~6am this morning.

2 Likes

Oh! @david ! I think the HRV4Training people have fixed this issue and not told me but now I need some help from you!

I just looked at the csv file thinking that I could write a little script to fix it and noticed there’s now a “date” and a “local” column and, what do you know, the local date is correct!
Would it be possible for you to make a little tweak so that intervals uses the “local” column now?

I assume this is new or I would have noticed it when I started this thread!

Here’s the last line from my file
1 date local time HR AVNN SDNN rMSSD
229 2023-06-10 2023-07-10 08:09 71.81719260065287 835.4545454545455 62.83153065755236 67.4020952640761

looks like this is now similar to the iOS version.
:+1:

So is that last bit of text file

date,timestamp_measurement
2023-10-06 00:01:00 +0000,2023-10-06 05:56:33 +0000,

Is that from your HRV4Training file in dropbox?
That is weird that the format is so different. David did mention earlier that they were different for Android and iOS. Silly HRV4Training people!

Yes it is.
Not sure why the timestamp_measurement is with +0000 when it’s clearly localtime and I’m not at +0000

1 Like

There’s something else odd. The date and timestamp aren’t different by a whole number of hours.
It’s 5:55:33 different.
And if you’re 6 hours ahead of UTC you should have run into the same problem. You would have run into it if that difference had been correct.
Perhaps the date field is just
UTC date, arbitrary 1 minute to make sure its past midnight, meaningless +0000

If your other rows in the table are the same then that’s it.

date,timestamp_measurement,HR_lying,HR_standing,AVNN_lying,AVNN_standing,SDNN_lying,SDNN_standing,rMSSD_lying,rMSSD_standing,pNN50_lying,pNN50_standing,LF_lying,LF_standing,HF_lying,HF_standing,LFHF_lying,LFHF_standing,test_duration,HRV4T_Recovery_Points,training,training_performance,training_type,training_phase,physical_condition,trainingRPE, trainingTSS, suffer_score, trainingMotivation, trainingDistance, sleep_quality,sleep_time,sleep_tobed,sleep_awake,mental_energy,muscle_soreness,fatigue,traveling,sickness,alcohol,baseline,advice,note,signal_quality, location, supplements, diet, custom_tag_1_name, custom_tag_2_name, custom_tag_3_name, custom_tag_1_value, custom_tag_2_value, custom_tag_3_value, menstrual_cycle, trainingTime, current_lifestyle, run_distance, run_time, run_pace, run_hr, run_elevation, bike_distance, bike_time, bike_speed, bike_elevation, bike_hr, bike_power, swim_distance, swim_time, swim_speed, swim_hr, vo2max, latitude, longitude, altitude, temperature, humidity, daily_message, injury

that’s the entire header… lots of stuffs
2023-10-05 00:01:00 +0000,2023-10-05 06:16:10 +0000,
2023-10-06 00:01:00 +0000,2023-10-06 05:56:33 +0000,

These are how the rows look. the 1min past midnight seems a bit ominous lol…
but I think you’re right, the +0000 is meaningless as It’s LocalTime, I’m GMT+8, not sure about UTC tho. Don’t think I’ll have any issues given that it’s in localtime.

Oh, so you’re not far from me! In fact you could be in Western Australia.
And you have rows where the date and the local date are different and yet you haven’t seen this problem?
Curiouser and curiouser!

I see what you mean about the format of the file being different!! There’s no lying and standing measurements. The app itself must be quite different I think.

This is the android header:
date local time HR AVNN SDNN rMSSD pNN50 LF HF HRV4T_Recovery_Points training training_performance training_type training_phase physical_condition trainingRPE trainingTSS trainingMotivation trainingDistance sleep_quality sleep_time sleep_awake sleep_tobed mental_energy muscle_soreness fatigue lifestyle traveling sickness alcohol note signal_quality location supplements diet custom_tag_1_name custom_tag_2_name custom_tag_3_name custom_tag_1_value custom_tag_2_value custom_tag_3_value menstrual_cycle trainingTime run_distance run_time run_pace run_hr run_elevation bike_distance bike_time bike_speed bike_elevation bike_hr bike_power swim_distance swim_time swim_speed swim_hr vo2max suffer_score latitude longitude altitude temperature humidity daily_message

I didn’t check all but they seem to be in sequence. the date is always there, but timestamp_measurement only when i actually measure and I only measure upon waking up, so theres no issue w/ crossing over to the next day.

Tho I have to admit, I don’t pay close attn to it enough to see if it’s every “off” by a day or such.

Could you please mail me (david@intervals.icu) a few lines from the file with the header line and I will see if I can use that local column. Tx.

I have added support for that local column. It will be used instead of the date column if present. Tx for sending me the data.

2 Likes

This may be a coincidence (this does happen from time to time), but this morning HRV4Training data did not upload. When I look at the Settings | DropBox | Import HRV4Training I see the following:

  • 4 minutes ago ~ Line 2: Bad local [2020-21-12]

I have the Local column, and this is with the Android HRV4Training app.

Edit: The entry for 2020-21-12 is the first row of data in this file, and the ‘date’ and ‘local’ cells are identical.

Robert

lol… this is sad and yet funny…

presume it’s the latest update?

Yes, the latest version (20th September 2023), so presumably the ‘local’ field was added then (or earlier), and the failure to import is possibly correlated with the change David applied.

Robert

david will need to see how to sort it out… Quite possibly w/ all the different permutations of output the app has, might have to jumpt thru a few hoops.