Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

amTimeAgo title and innerText inconsistancy #225

Open
stackia opened this issue Mar 5, 2016 · 1 comment
Open

amTimeAgo title and innerText inconsistancy #225

stackia opened this issue Mar 5, 2016 · 1 comment

Comments

@stackia
Copy link
Contributor

stackia commented Mar 5, 2016

If moment-timezone is enabled, and set angularMomentConfig.timezone to some timezone, when the browser local timezone is not the same with angularMomentConfig.timezone, amTimeAgo will give different text on element's title and innerText (full date format).

Problem is caused by the '.local()' here:
https://github.com/urish/angular-moment/blob/master/angular-moment.js#L233
https://github.com/urish/angular-moment/blob/master/angular-moment.js#L239

They should both use '.local()' or neither. May be it's better to give an 'alwaysLocalTimezone' option?

@urish
Copy link
Owner

urish commented Mar 5, 2016

I think it makes more sense to simply remove the .local() at the second location. We have the amLocal filter that the library users can utilize for this purpose.

Any chance you could send a pull request with this change?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants