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
Issue #86: Added support for Unix Timestamps #168
Conversation
Needs rebase. |
Rebased. |
Tests are now failing here. |
return time.getTime() / 1000; | ||
} | ||
callback(new Errors.EINVAL('Cannot parse time: ' + time)); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary.
Is this ready to go now? I see the tests are passing. |
atime = (atime) ? atime : currentTime; | ||
mtime = (mtime) ? mtime : currentTime; | ||
|
||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utimes_file
already checks these parameters, so if you call toUnixTimestamp
in there you can assume integer arguments.
@kwkofler you still gonna finish this, or do I need to find a new owner? |
I can finish it. I should hopefully have time tonight or tomorrow evening, the commute to my coop placement is consuming a lot of my day. |
Has anyone had a chance to take a look at this? Let me know if I misunderstood the feedback. |
if (typeof time === 'number') { | ||
return time; | ||
} | ||
if (typeof time === 'object' && Object.prototype.toString.call(time) === '[object Time]') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to if (typeof time === 'object' && typeof time.getTime === 'function')
Fixed this up so it could land on |
No description provided.