Our blog

The latest thoughts and announcements from Tidepool's team.

Back

It’s a Matter of Time

October 31st, 2015

The end of US Daylight Savings 2015 is upon us. And in its honor, we at Tidepool offer this blog post about time. Specifically, why it’s so hard to keep track of time on diabetes devices, and what Tidepool just did to make it a whole lot easier.

Have you ever looked at your device and noticed that the date or time was completely wrong? If you’re lucky, it’s off by a minute or two. But it might even be off by a day, week, or year! We’ve all done it. (Literally, every Tidepool employee living with T1D has.) You travel, forget to change the time, or you accidentally change it to the wrong month or year. Or you forget about daylight savings time until two days later. Then, when you upload your data to your data management software, it’s basically useless. Especially if two of your devices were set to completely different times.

We’ve been working hard on a new feature that helps make bad time good, making it MUCH easier to use the data from your devices in meaningful ways.

Here’s what you need to know.

How it works

When I fly from SF to NYC and update the time on my device, I suddenly see a 3 hour gap in my data. I didn’t actually go 3 hours without insulin or blood sugars. I just changed timezones. But as you’ve probably noticed, our diabetes devices do not know about timezones. When looking at data reports, this becomes a major issue. Especially when we update different devices at different times.

Diabetes pro-tip: If I travel to Europe, I like to update my CGM right away. But I wait a couple days to update my pump because my body clock takes time to adjust, so I don’t want to switch my basal rates and other pump settings straight away.

While our devices don’t know about timezones, many do keep track of the changes we make to the display time. So Tidepool now checks for time changes on your device and uses that information to connect the dots for you. The Tidepool Platform puts all your devices back into alignment, regardless of when you changed the time. (Seriously? Seriously!)

How to use it

Before you upload your data, look at your device and make sure the time is right! When you upload your data, the Tidepool Uploader will ask you to enter a timezone. Enter the timezone that matches the timezone of the most recent data generated by your device.

Tidepool Uploader with timezone selector shown.

Tidepool Uploader with timezone selector.
For example, if you’re in California and your device is in Pacific time, enter the timezone on the Tidepool Uploader as Pacific Time. But if you’re in California and your device is in Eastern time, enter the timezone on the Tidepool Uploader as Eastern Time.

We’ll take that one piece of info and use it to analyze all your historical diabetes data along with when your device says you’ve changed the time, and we’ll line everything up as it should be.

What devices it works with

In general, this feature works with all insulin pumps and CGMs, but it does not work with BG meters. The reason is simple: most pumps and CGMs store data about when you changed your device display time. Most current BG meters do not.

What we store and what you’ll see

As stewards of your data, Tidepool will securely store both the original display date and time from your device, as well as the corrected date and time.

For now, Blip automatically displays your data in the timezone you selected with your most recent upload. In the future, you’ll be able to select the timezone you want to see your data in or view your data in its original device display time.

Examples of what it will fix

Here are some examples we’ve already seen of broken data getting fixed.
Data in the wrong year
This person needed to change the time on their Dexcom CGM and accidentally set it to the wrong year (2014)! If we showed the data using the device’s displayed date and time, it would look like this:

The images above show CGM data that jumps from July 19th at 3pm in 2014 to 2015. The images above show CGM data that jumps from July 19th at 3pm in 2014 to 2015.
But after we fix the data, it displays as a continuous line. Hooray!

This image shows CGM data that’s been automatically adjusted for continuity. This image shows CGM data that’s been automatically adjusted for continuity.
Overlapping data
Imagine you started using your new pump in June, but when you were setting it up, you accidentally programmed the date to July. And it takes you six weeks to notice. At that point, your pump thinks it’s August, but it’s really July. So you set your pump back to the actual date in July. (Yes, this really happened to one of us.)

The pump stores your data as though you lived the month of July twice. This results in basal rates that overlap, twice as many boluses as you’d expect, and your suspends go haywire, because there’s no telling where one starts and ends…

This image shows overlapping BG, bolus, and basal data from an insulin pump experienced July 3 twice. This image shows overlapping BG, bolus, and basal data from an insulin pump experienced July 3 twice.
But after we fix it, your data starts back in June when it should! There’s no more overlapping data, and your suspends are laid out exactly as they actually happened.

This images shows the corrected version of July 3’s diabetes data. Notice the reduction in BG data points and boluses, and that basal rates are no longer overlapping. This images shows the corrected version of July 3’s diabetes data. Notice the reduction in BG data points and boluses, and that basal rates are no longer overlapping.
Wrong AM/PM
Another common issue is that a device is set to 5PM, but it’s really 5AM. If the user corrects it, we might expect to see 12 hours of overlapping data.

The image above shows 12 hours over overlapping data due to PM to AM change. The image above shows 12 hours over overlapping data due to PM to AM change.

After we cleanse it, your data is continuous.

The image above shows normal, continuous basal and bolus data. The image above shows normal, continuous basal and bolus data.

Daylight Savings
You might be wondering, “Does this new feature correct for daylight savings?” Why yes, yes it does. For daylight savings, you can update pump and CGM exactly during the time change, six hours later, or even six days later. Just make sure the time is updated before you upload your data and we’ll take care of the rest.

Hint, Hint
Oh and by the way, we’ll give you a little reminder of when you did change the time.

An icon in Blip's note pool reminds you when you changed your device time. An icon in Blip’s note pool reminds you when you changed your device time.

For Developers

For fellow techies like us, what we’re really talking about here is doing our best to convert device local time to UTC time. And this change not only lets us align your diabetes data, but it also sets the stage for Blip (and any other software that uses the Tidepool Platform), to display your diabetes data along with other cloud data, like fitness bands and activity monitors. Fortunately, like your cell phone, these modern health devices all tend to do a good job of keeping track of UTC time, which will make syncing them much easier.

The quality of user data is so important to making great decisions about diabetes therapy. The Tidepool team worked incredibly hard on this time continuity initiative. Jana Beck led the development of this project and contributed this document on GitHub describing this feature with technical details. The code is also available on GitHub for review, here. We’d love your feedback.

Leave a Reply

Your email address will not be published. Required fields are marked *