Description
Assign a timestamp to fixed-length days after subtracting a supplied boundary offset.
Personal health logs distinguish observed events, unknown entries, device/source identifiers and chosen day or streak boundaries. A numerical activity duration or recorded symptom label organizes supplied data rather than diagnosing a condition. Fixed 86400-second days differ from civil days affected by timezone and daylight-saving changes.
Assign a timestamp to fixed-length days after subtracting a supplied boundary offset.
When to use this tool
Use Wearable Day Boundary Offset when checking the stated personal-log, missingness, time or streak convention.
How to use the tool and how it works
- Enter timestampSeconds, boundaryOffsetSeconds. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read shiftedDayIndex, secondsIntoShiftedDay. Use the output convention below.
Subtract boundaryOffsetSeconds from timestampSeconds, floor-divide by 86400 for shiftedDayIndex, and return the nonnegative remainder within that fixed-length day.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| timestampSeconds | Timestamp Seconds | Required. Finite number. |
| boundaryOffsetSeconds | Seconds subtracted before assigning a fixed 86400-second day; not an IANA timezone. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| shiftedDayIndex | Floor quotient, including negative shifted timestamps. | Required. Safe integer. |
| secondsIntoShiftedDay | Seconds Into Shifted Day | Required. Finite number. |
{
"input": {
"timestampSeconds": 90000,
"boundaryOffsetSeconds": 21600
},
"output": {
"shiftedDayIndex": 0,
"secondsIntoShiftedDay": 68400
}
} Limitations and assumptions
- This is a numerical day boundary, not timezone or daylight-saving conversion; negative timestamps can produce negative day indexes.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Review original records and calibrated devices; consult qualified health professionals for symptoms, interpretation or actual care decisions.
References
Similar or alternative tools
- Clinical Datetime Offset Known Flag
Expose whether a supplied clinical datetime offset is known and can be applied.
- Cross Border Event Timezone Label
Preserve a cross-border event's timestamp and timezone label.