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

Alternate Clock Source Support #2766

Closed
wants to merge 2 commits into
base: develop
from

Conversation

Projects
None yet
5 participants
@atogata
Contributor

atogata commented Nov 22, 2015

Fix #2337

Motivation: Need to implement client-side time synchronization for other project.

Example:

moment().toISOString()
"2015-11-22T23:02:47.586Z"

moment.fn.now = function() { return 10000; };
() { return 10000; }

moment().toISOString()
"1970-01-01T00:00:10.000Z"

moment.fn.now = function() { return Date.now() * 2; };
() { return Date.now() * 2; }

moment().toISOString()
"2061-10-13T22:06:22.934Z"
@jokesterfr

This comment has been minimized.

jokesterfr commented Nov 23, 2015

I like it, it's a clean way to customize the now() method.

@icambron

This comment has been minimized.

Member

icambron commented Nov 26, 2015

👍

@ichernev

This comment has been minimized.

Contributor

ichernev commented Dec 9, 2015

Merged in 816245f

@ichernev ichernev closed this Dec 9, 2015

ichernev added a commit that referenced this pull request Dec 9, 2015

@mj1856 mj1856 added this to the 2.10.7 milestone Dec 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment