Skip to content

time difference of 30 min #13

@saifkhan97

Description

@saifkhan97

please change the getMinutes and getSeconds to getUTCMinutes and getUTCSeconds after applying the changes will work fine
if (this.timeOnly) {
var /** @type {?} */ hours = date_diff.getUTCHours() + day_hours;
return this.twoDigit(hours) +
":" + this.twoDigit(date_diff.getUTCMinutes()) + ":"
+ this.twoDigit(date_diff.getUTCSeconds());
}
else {
// Date() takes a UTC timestamp – getHours() gets hours in local time not in UTC. therefore we have to use getUTCHours()
return day_string + this.twoDigit(date_diff.getUTCHours()) +
":" + this.twoDigit(date_diff.getUTCMinutes()) + ":"
+ this.twoDigit(date_diff.getUTCSeconds());
}

in ngx-countdown-timer.umd.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions