-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Setup (always fill this in):
- iOS or Android? both
- Expo or regular React Native? React Native
- React Native Version: 0.63.3
react-native-activity-feedorexpo-activity-feedversion:npm list --pattern <package-name>/yarn list --pattern <package-name>: react-native-activity-feedgetstreamversion:npm list --pattern getstream/yarn list --pattern getstream4.5.4
Describe the bug
When adding a comment, the displayed time is one hour ahead. Comments have "in an hour" appended.

To Reproduce
Steps to reproduce the behavior:
- Live in Belgium
- Wait until winter (daylight savings must be active)
- Make a comment
I don't know whether daylight savings have something to do with it, but I'm guessing you guys aren't living here so probably never encountered this. So I'm betting it's the cause.
Expected behavior
That the time is displayed right. The text should display "just now" after the comment is made.
Additional context
See
| export function humanizeTimestamp( |
The bug is caused by humanizeTimestamp which for some reason appends one hour through utcOffset().
// Following calculation is based on assumption that tDateTimeParser()
// either returns momentjs or dayjs object.
const time = tDateTimeParser(timestamp).add(
Dayjs(timestamp).utcOffset(),
'minute',
); // parse time as UTCThe timestamp is already in UTC format so this .add( call is unnecessary. Normally I'd make a PR but judging from the number of open PRs and tickets and lack of response I wonder why I even bother making this ticket.