Description
Parse a signed offset including seconds.
A fixed UTC offset differs from a named timezone whose rules can vary by date. A zone-like label or signed-zero offset also carries metadata that a numeric minute total alone cannot express.
Parse a signed offset including seconds.
When to use this tool
Use Timestamp Offset Second Component Token when inspecting a supplied offset or timezone annotation.
How to use the tool and how it works
- Enter offset. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sign, hours, minutes, seconds, totalSeconds. Use the output convention below.
Parse a signed offset including seconds. Accept ±HH:MM:SS within 23:59:59; return sign, components and signed totalSeconds.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| offset | Offset | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sign | Sign | Required. Safe integer. |
| hours | Hours | Required. Safe integer. |
| minutes | Minutes | Required. Safe integer. |
| seconds | Seconds | Required. Safe integer. |
| totalSeconds | Total Seconds | Required. Safe integer. |
json
{
"input": {
"offset": "+05:30:20"
},
"output": {
"sign": 1,
"hours": 5,
"minutes": 30,
"seconds": 20,
"totalSeconds": 19820
}
} Limitations and assumptions
- This is a restricted numeric token, not necessarily a valid RFC 3339 offset or actual timezone rule.
- 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.
Alternative or Complementary methods
Use an authoritative timezone database and complete timestamp context to resolve an actual local time or day.
References
Similar or alternative tools
- Date: Timestamp Offset Negative Zero Check
Distinguish known zero UTC offset from unknown local offset.
- Timezone Offset Sign Hour Minute Pair
Format offset sign, hour and minute components.