Timestamp with a time but no timezone shows as 1 January 1970
Maintainers usually reply within 1 day
@Sarthak-agrawal-tech is already working on this.
Since Nov 11, 2026.
- #43651 by @Sarthak-agrawal-tech — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
The issue identifies packages/message-parser, grammar.pegjs, src/utils.ts, and the timestamp tests. Start by reading timestampFromHours alongside timestampFromIsoTime and check how the grammar passes a missing timezone. Add coverage for time-only forms without a timezone, then run the message parser tests and confirm those forms resolve to today at the requested time.
Written by the indexing model from the issue text.
Description
Description:
A timestamp with only a time and no timezone, like <t:10:30>, shows as 1 January 1970 instead of today at 10:30.
Steps to reproduce:
- Send a message with
<t:10:30>(or<t:10:30:00:t>). - Or parse it directly with
@rocket.chat/message-parser.
Expected behavior:
The timestamp is today at 10:30.
Actual behavior:
The parser returns timestamp "0", which is 1 January 1970:
"<t:10:30>" => [{"type":"PARAGRAPH","value":[{"type":"TIMESTAMP","value":{"timestamp":"0","format":"t"},"fallback":[0,9]}]}]
Server Setup Information:
Found in packages/message-parser on develop, not on a running server.
Additional context
When no timezone is given, the grammar passes null (tz:Timezone? in grammar.pegjs, lines 136 and 138). timestampFromHours in src/utils.ts has timezone = '', but that default only applies to undefined, not null. So the date string ends in ...T10:30:00null, which is an invalid date, and NaN | 0 gives 0.
timestampFromIsoTime just below already handles this with timezone ? timezone : '', so <t:2026-11-01T10:00:00:f> works. The tests only cover time forms with a timezone, like <t:10:00+00:00>.
The open PR #41752 changes the same line but keeps the null, so with it the result would be "NaN" instead of "0".
- Dominant language
- TypeScript
- Stars
- 46.5k
- Forks
- 14.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 381
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/Rocket.Chat
-
Mark the empty state busy while a new search loads, like the table */}Possibly taken @aditya25bcy10173-a11y claimed this 2 days ago. Opentodo type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RocketChat/Rocket.Chat#43699 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Move this mapping from useQuery's old `select` into a usePaginatedQuery `combine`Possibly taken @aditya25bcy10173-a11y claimed this 3 days ago. Opentodo type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/Rocket.Chat#43609 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
evaluate switching to the other tab when the selected tab's permission is revoked mid-sessionPossibly taken @schizophrenicmaniac claimed this 4 days ago. Opentodo type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
RocketChat/Rocket.Chat#43579 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs say packages can be installed with `npm` but use unsupported `patch:` URLPossibly taken A pull request linked to this issue is open or already merged. Opentype: bug
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
RocketChat/Rocket.Chat#43554 · 4 comments ·
Maintainers usually reply within 1 day
-
roles.removeUserFromRole ignores the documented roomId parameterPossibly taken @maalideekshith claimed this 15 days ago. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RocketChat/Rocket.Chat#43346 · 2 comments ·
Maintainers usually reply within 1 day
All issues in RocketChat/Rocket.Chat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
open-webui/tether#52 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/void#835 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AykutSarac/jsoncrack.com#616 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
melgarafael/DeskcommCRM#4679 ·
Maintainers usually reply within 1 day