Skip to content

Main content

Timestamp Offset Second Component Token Tool

Compute timestamp offset second component token from explicit bounded inputs.

Loading tool…

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

  1. Enter offset. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
offsetOffsetRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
signSignRequired. Safe integer.
hoursHoursRequired. Safe integer.
minutesMinutesRequired. Safe integer.
secondsSecondsRequired. Safe integer.
totalSecondsTotal SecondsRequired. 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

  1. Calculation and input contract: date/timestamp-offset-second-component-token — tool.io

Similar or alternative tools