RocketChat / RocketChat/Rocket.Chat

Date format of Rest API and Realtime API are not the same

Open
#25,574 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Actual behavior:

Date format returned by realtime api stream-notify-user :

{
  "_updatedAt":{"$date":1653021253196}
}

By Rest api groups.history

{
  "ts":"2022-05-20T04:16:45.965Z"
}
Expected behavior:
  • Is this behavior expected?
  • Is there a setting to change the format?
Server Setup Information:
  • Version of Rocket.Chat Server: 4.7.0
  • Operating System: CentOS
  • Deployment Method: docker
  • Number of Running Instances: 1
  • NodeJS Version: v14.18.3
  • MongoDB Version: 4.0.28 / mmapv1 (oplog Enabled)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked stream-notify-user and groups.history API documentation, then trace the two response formats in the relevant API entry points. Done means the expected date representation is decided and documented or both APIs consistently return the agreed format, with any setting behavior clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.