Skip to content
Last updated

Time Change (timeChange)

Quick Summary

One of:

A timeChange event

annotationsArray of objects, [ 0 .. 100 ] items, unique(Annotation Array)

An array of annotations.

archivedTimestring, (date-time)(Date/Time)read-only

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
archivedDatasetIdstring, [ 17 .. 37 ] characters(Data Set ID)^(upid_[0-9a-f]{12}|upid_[0-9a-f]{32}|[0-9a-f...
Example:"ce8cc5f7595575945f91fc6710db6fef"
associationsArray of objects(Association Array)

An array of associations for the resource.

clockDriftOffsetinteger, (int64), [ -86400000 .. 86400000 ](Clock Drift Offset)

Clock drift offset, expressed as milliseconds.

Example:0
conversionOffsetinteger, (int64)(Conversion Offset)

Conversion offset, expressed as milliseconds.

Example:0
createdTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
createdUserIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-only

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

deduplicatorobject(Deduplicator Descriptor)
deletedTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
deletedUserIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-only

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

deviceIdstring, non-empty(Device ID)

Globally unique to device and repeatable with each upload, e.g. device make and model with serial number

Example:"MMT-1711:12345678"
deviceTimestring(Date/Time without Timezone)^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$

RFC 3339 / ISO 8601 timestamp without timezone information

Example:"2017-02-06T02:37:46"
historyArray of objects(Event History [Proposed])

Revision history of the event

idstring, [ 17 .. 37 ] characters(Data Set ID)^(upid_[0-9a-f]{12}|upid_[0-9a-f]{32}|[0-9a-f...required
Example:"ce8cc5f7595575945f91fc6710db6fef"
locationobject(Location)

Location information associated with the resource. One or both of name and gps must be specified.

modifiedTimestring, (date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
modifiedUserIdstring(Tidepool User ID)^([0-9a-f]{10}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-...read-only

String representation of a Tidepool User ID. Old style IDs are 10-digit strings consisting of only hexadeximcal digits. New style IDs are 36-digit UUID v4

notesArray of strings, [ 1 .. 100 ] items(Note Array)

An array of 1 to 100 notes.

originobject(Origin)

External origin information for the source of the resource.

payloadobject(Payload)

Grab bag field for data that isn't yet part of the data model. The maximum size is 4K bytes.

sourcestring
Value:"carelink"
tagsArray of strings(Tag Array)

An array of tags.

timestring, (date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example:"2017-02-06T02:37:46Z"
timezonestring(Time Zone)

A string timezone name from the IANA timezone database

Example:"Europe/London"
timezoneOffsetinteger, (int32), [ -10080 .. 10080 ](Time Zone offset)

Time zone offset, expressed as positive or negative number of minutes from UTC.

Example:-420
typestring(Tidepool Data Type)required

Data type

Value:"deviceEvent"
Example:"upload"
uploadIdstring, [ 17 .. 32 ] characters(Upload ID)^([0-9a-f]{32}|upid_[0-9a-f]{12})$

An upload identifier; this field should be the uploadId of the corresponding upload record

Example:"0d92d5c1c22117a18f3620b9e24d3c06"
subTypestringrequired
Value:"timeChange"
guidstringdeprecated

A string ID. Added to each event during data processing in the Tidepool Uploader or upon ingestion by the platform data ingestion service.

methodstringrequired
Enum:"automatic""manual"
fromobject(Time Change Info)
toobject(Time Change Info)required

Sub-Type (subType)

A time change event represents an instance when a diabetes device user changed the display date & time settings on the device. An accurate history of time change events is crucial as Platform uses the most recent set of time change events, raw log from a device's records and user's selection of timezone to translate relative (local time) timestamps of device records into UTC timestamps. This is to align all diabetes device timelines. For further information, please see "Bootstrapping" to UTC.

All the relevant data from the time change event is stored in various fields on an embedded change object.


Change (change)

Contains the following properties:

  • From
  • To
  • Method

When a device's date & time is updated, the to, from and method fields should be included within the change embedded object on a time change event. The from field details the date & time the device is being changed from (the old date & time). The to field details the date & time the device is being changed to (the new date & time). Both the from and to properties are formatted as ISO 8601 timestamps without any offset from UTC specified; this is the exact same "relative" timestamp format used for device time.

The method field on the change object details whether the time change was manual (user-initiated) or automatic (initiated by the device).


Examples

Example (client)
{
    "type": "deviceEvent",
    "subType": "timeChange",
    "change": {
        "from": "2018-05-14T08:17:08",
        "to": "2018-05-14T07:20:33",
        "agent": "manual"
    },
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "deviceId": "DevId0987654321",
    "deviceTime": "2018-05-14T18:17:08",
    "guid": "7a91b3bc-2808-4c92-8769-3526db11ce41",
    "id": "0ccaad06f9104c098595cf6e871edc09",
    "time": "2018-05-14T08:17:08.814Z",
    "timezoneOffset": 600,
    "uploadId": "SampleUploadId"
}
Example (ingestion)
{
    "type": "deviceEvent",
    "subType": "timeChange",
    "change": {
        "from": "2018-05-14T08:17:08",
        "to": "2018-05-14T07:20:33",
        "agent": "manual"
    },
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "deviceId": "DevId0987654321",
    "deviceTime": "2018-05-14T18:17:08",
    "time": "2018-05-14T08:17:08.815Z",
    "timezoneOffset": 600,
    "uploadId": "SampleUploadId"
}
Example (storage)
{
    "type": "deviceEvent",
    "subType": "timeChange",
    "change": {
        "from": "2018-05-14T08:17:08",
        "to": "2018-05-14T07:20:33",
        "agent": "manual"
    },
    "_active": true,
    "_groupId": "abcdef",
    "_schemaVersion": 0,
    "_version": 0,
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "createdTime": "2018-05-14T08:17:13.815Z",
    "deviceId": "DevId0987654321",
    "deviceTime": "2018-05-14T18:17:08",
    "guid": "2f17e38d-a39a-4116-a11c-5f014ea9ddd4",
    "id": "8f3abbd0fe4f49879f1bd8b2356c1942",
    "time": "2018-05-14T08:17:08.815Z",
    "timezoneOffset": 600,
    "uploadId": "SampleUploadId"
}

Keep Reading