-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amTimeAgo with different timezones #150
Comments
Has no one faced this issue? Any help would be really appreciated! |
Does the time returned from the server have timezone information in it? Could you provide sample data? I believe the amUtc pipe just puts the moment object in UTC mode, which just changes how the information is displayed/manipulated. |
@nicolassharp give |
@connormlewis Thanks your solution worked for me. But can you explain what's exactly happening in your snippet? |
I have an issue at the moment where my server returns a timestamp in UTC, and the user's computer is UTC + 1 (BST). This means that an action they just performed says '1 hour ago'.
I'm using
{{activity.timestamp | amTimeAgo}}
, would{{activity.timestamp | amUtc | amTimeAgo}}
fix this?I would just test myself but I don't have access to the endpoint right now.
Update: I've now tested using
{{activity.timestamp | amUtc | amTimeAgo}}
and unfortunately it doesn't fix the error.The text was updated successfully, but these errors were encountered: