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

Commit

Permalink
Change set of localDate closer to the "server" timestamp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mimimi15 committed Oct 25, 2018
1 parent aa3e39f commit de6f6a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions angular-moment.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

function angularMoment(angular, moment) {

var localDate = new Date().getTime();

if(typeof moment === 'undefined') {
if(typeof require === 'function') {
moment = requireMoment();
Expand Down Expand Up @@ -200,8 +202,7 @@
var fullDateThreshold = amTimeAgoConfig.fullDateThreshold;
var fullDateFormat = amTimeAgoConfig.fullDateFormat;
var fullDateThresholdUnit = amTimeAgoConfig.fullDateThresholdUnit;

var localDate = new Date().getTime();

var modelName = attr.amTimeAgo;
var currentFrom;
var isTimeElement = ('TIME' === element[0].nodeName.toUpperCase());
Expand Down

0 comments on commit de6f6a1

Please sign in to comment.