angular-moment icon indicating copy to clipboard operation
angular-moment copied to clipboard

amTimeAgo title and innerText inconsistancy

Open stackia opened this issue 9 years ago • 1 comments

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?

stackia avatar Mar 05 '16 10:03 stackia

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!

urish avatar Mar 05 '16 19:03 urish