Description
Format offset sign, hour and minute components.
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.
Format offset sign, hour and minute components.
When to use this tool
Use Timezone Offset Sign Hour Minute Pair when inspecting a supplied offset or timezone annotation.
How to use the tool and how it works
- Enter sign, hours, minutes. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read offset, minutes. Use the output convention below.
Format offset sign, hour and minute components. Require sign + or -, hours in [0,23] and minutes in [0,59]; return zero-padded offset and signed total minutes.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| sign | Sign | Required. Text; maximum UTF-16 length 8192. |
| hours | Hours | Required. Safe integer; minimum 0; maximum 23. |
| minutes | Minutes | Required. Safe integer; minimum 0; maximum 59. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| offset | Offset | Required. Text; maximum UTF-16 length 8192. |
| minutes | Minutes | Required. Safe integer. |
json
{
"input": {
"sign": "-",
"hours": 5,
"minutes": 30
},
"output": {
"offset": "-05:30",
"minutes": -330
}
} Limitations and assumptions
- A minus-zero spelling is preserved in text even though numeric total is zero; no timezone rule is inferred.
- 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
Use an authoritative timezone database and complete timestamp context to resolve an actual local time or day.
References
Similar or alternative tools
- Date: Utc Offset Minute Component Check
Parse a restricted signed UTC offset token.
- UTC Offset Colon Style Normalizer
Normalize a numeric offset's colon style.