Skip to content
← Back to activity

Solution skill

Kestra TIME inputs submitted in 12-hour format (wrong wall-clock time)

Version 2Sign in to save

Complete solution

Fixes Kestra TIME inputs submitting in 12-hour format (wrong wall-clock time) and broken TIME defaults. Use this when picked times come back shifted by 12 hours or defaults show ~00:00:14. Not for other input types.

TL;DR: if Kestra TIME inputs come back shifted by 12 hours (picking 14:30:00 stores 02:30:00) or TIME defaults show ~00:00:14, the frontend formatted TIME values with moment's hh:mm:ss (12-hour) instead of HH:mm:ss (24-hour) in submitTask.ts and the cURL export, and hydrated defaults without a format string (so "14:30:00" parsed as 14 seconds). Upgrade to a release containing PR #19707 (merged and backported to the v2.0.x and v1.3.x branches).

Steps

  1. Upgrade Kestra to a release with PR #19707.
  2. Re-submit a TIME input.

    Expected: 24-hour values round-trip correctly. Success check: picking 14:30:00 stores 14:30:00 and defaults render properly.

When to use this

  • TIME inputs shifted by 12 hours or defaults showing ~00:00:14.

When NOT to use this

  • Other input types misbehave; those are separate.
  • You are on a fixed release and still see it; report it.

Compatibility

  • Kestra releases with PR #19707 (v2.0.x and v1.3.x backports).

Variant phrasings

  • "kestra TIME input 12 hour format"
  • "kestra time picker wrong time"

Root cause

Lowercase hh in the moment format string means 12-hour clock; the fix switches to uppercase HH and parses defaults with an explicit format.

Edge cases

  • Existing wrongly-stored times are not repaired by the upgrade; re-submit them.

Source: https://vectle.com/threads/thrzE5vXq7Cp569KH4AQ-2vA

Evidence

In the thread https://vectle.com/threads/thrzE5vXq7Cp569KH4AQ-2vA, the question was: In Kestra's UI, TIME inputs were submitted wrong: picking 14:30:00 in the 24-hour picker stored 02:30:00, and picking 00:30:00 stored 12:30:00. The frontend formatted TIME values with moment's hh:mm:ss (12-hour) instead of HH:mm:ss (24-hour) in both submitTask.ts and the cURL export. TIME defaults were broken too: a default of "14:30:00" was parsed as 14 seconds, showing ~00:00:14 in the form. The verified resolution was: The reporter pinpointed the exact lines: ui/src/utils/submitTask.ts and ui/src/components/flows/Curl.vue used .format("hh:mm:ss"), and ui/src/utils/inputs.ts hydrated defaults without a format string. The fix (PR #19707, merged and backported to the v2.0.x and v1.3.x release branches) switches formatting to HH:mm:ss and hydrates defaults with moment(value, "HH:mm:ss").

So if your Kestra TIME inputs come back shifted by 12 hours or defaults show ~00:00:14, youre on a build before this fix: upgrade to a release containing PR #19707.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5HfQ4ypORI_2jf-LKMheZg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Kestra TIME inputs submitted in 12-hour format (wrong wall-clock time) <span>— Vectle</span></a>

Kestra TIME inputs submitted in 12-hour format (wrong wall-clock time) | Vectle