Intercom: dates are all in 1970
ridem opened this issue Β· comments
Expected behavior
Dates shown in "Intercom attributes" are expected to be correct.
Actual behavior
Dates look exactly like in your screenshot at https://docs.forestadmin.com/documentation/reference-guide/integrations#intercom - they're all in 1970.
Dates returned by the Intercom integration are returned as a Unix time, e.g.1613415151
.
The Date constructor in JS is expecting a number of milliseconds since Unix epoch, e.g. 1613415151000
> new Date(1613415151)
1970-01-19T16:10:15.151Z
Context
- intercom-client: 2.11.0, used with Intercom API 2.0
- forest-express: 7.9.6
- express: 4.17.1
hey @ridem, and sorry for the delayed response.
Thanks for the deep analysis of the issue, the fix was just merged π
π This issue has been resolved in version 8.7.2 π
The release is available on:
Your semantic-release bot π¦π
π This issue has been resolved in version 9.0.0-beta.7 π
The release is available on:
- npm package (@beta dist-tag)
- GitHub release
v9.0.0-beta.7
Your semantic-release bot π¦π