Apnea Board Forum - CPAP | Sleep Apnea
Feature request -- Air11 time zone, have OSCAR do the right thing. - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: Feature request -- Air11 time zone, have OSCAR do the right thing. (/Thread-Feature-request-Air11-time-zone-have-OSCAR-do-the-right-thing)



Feature request -- Air11 time zone, have OSCAR do the right thing. - cathyf - 03-31-2022

I'll start by saying that I am somewhat familiar with the outright religious wars in the the operating systems world over how to correctly treat time. This is something that even windows does correctly -- all time on computers is kept in GMT, and at the point that you ask for a time stamp the translation to localtime gets done according to the computer's time zone setting and all the right logic that is programmed into the operating system. On a modern computer you don't set the clock, the computer gets the time from an NTP server, you set the time zone, and then the computer uses the time and the time zone to calculate localtime.

With that as prologue, I'm thinking that ResMed has actually done time-keeping properly on the Air11. The system setting is the time zone, and it looks like part of the daily phone home has the cpap sync with an NTP server.

That means that it should be reasonably simple for OSCAR to take that information and run with it and deal with time well.

The Air11's time-zone value is right there in the settings, and OSCAR reads and stores settings.

The computer's time zone setting is readily available with a system call.

My feature suggestion is that OSCAR should take all of that readily-available information and convert all of times in an Air11 data feed into the computer's time zone.

In addition to making the average user's experience simple, I think that spoofing the time-zone setting properly would provide a rather elegant solution to the night-shift worker's problem, too.

Take this as an example: imagine that you live in GMT-7, and you sleep during the day (the GMT-7 day). If OSCAR could do the time-zone magic I'm requesting, then the right thing to do would be to set your Air11 to be in time zone GMT+5. Then suppose you went to sleep at 7am and slept until 3pm. Your Air11 would record that as 7pm to 3am and record it as a single night, with all of the dates correct. Then when OSCAR reads your data in, it looks in the Air11 settings and sees that the cpap thinks it lives in GMT+5, and it asks the computer and finds out that the computer thinks it's in GMT-7. So then OSCAR displays all of your graphs as running from 7am to 3pm.

We could call this the "Margaritaville Meridian" in honor of the Jimmy Buffett song, because it's always 5 o'clock somewhere!


RE: Feature request -- Air11 time zone, have OSCAR do the right thing. - Crimson Nape - 04-01-2022

It appears that you put some thought into this.  Kudos!  A fresh set of eyes and ideas are always helpful.  

I would like to point out that Mac and Linux store the computer's bios clock in UTC, Windows sets the bios clock to the current timezone's time.   The AS11 doesn't provide for those areas in the world that have a half-hour timezone offset.    

Since the Resmed stores the data for its day (noon to noon) in a folder, how do you address changing directories at noon?  How would you know which sleep sessions to split?   Resmed also writes its treatment settings for each day at the first sleep session for the day.  If you sleep through a day change, the current settings would be written for that day.  Now later in the day you start the next day's sleep data, having modified your settings, how do you address the modified settings wouldn't be displayed for another day.  

Using your example, how would the system know that you set it to the time offset and not because you were traveling across different timezones and didn't import the data until you returned?