-
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
no implementation of amLocal #122
Comments
I also searching some method to convert from UTC to Local time, like it was in angular-moment: Perhaps there is some other way to convert from UTC to Local time? |
This would be awesome! I would need to display amTimeAgo pipe in local time (not compared to utc time) |
A pull request will be appreciated! |
@urish did you see this: reberinformatik@0d545cc |
Yes, if you can make a proper pull request out of it (with tests, updating the documentation in README and everything), that'd be awesome. Here is an example for a good PR: https://github.com/urish/angular2-moment/pull/148/files |
No update from my end - if someone send a proper PR I will try to merge it this weekend |
10-4. Thanks for the update. I'll try to submit a PR this weekend if it hasn't already been submitted by then. |
@benwilkins did you happen to be superhero and fixed this? :) |
I updated the package, but still having problem to display the local time:
I'm located UTC+3 and the bottom line should output "2017-07-20 18:05", but it displays the same UTC datetime as first row. Any ideas? |
@benwilkins @urish should this work or not? :) |
amLocal pipe not working. getting error message below:
|
I couldn't get the amLocal to working to convert from UTC to local - so I did it this way.
Reference: https://stackoverflow.com/a/6525602/651556 |
Sorry. The PR I submitted was of someone else's code. I didn't test, just assumed he had. I may look into this more if I have time. |
The conversion to local is done using I tested a few different scenarios in the console to see what is happening. I'm GMT -0500, so I should be getting 2017-08-05 15:30:
It appears that the local pipe should first set the value as UTC, then convert it to local. I've submitted a PR with the update. @urish - I actually need this fairly quickly. Could you review and update this weekend? |
Closing as we now have |
Hi,
Is there any way to achieve what amLocal (angular-moment) does?
Thanks
The text was updated successfully, but these errors were encountered: