File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ Commit.prototype.message = function(callback) {
106106} ;
107107
108108/**
109- * Retrieve the commit time as a unix timestamp in seconds .
109+ * Retrieve the commit time as a unix timestamp.
110110 *
111111 * @param {Commit~timeCallback } callback
112112 */
@@ -118,7 +118,8 @@ Commit.prototype.time = function(callback) {
118118 */
119119 this . rawCommit . time ( function ( error , time ) {
120120 if ( success ( error , callback ) ) {
121- callback ( null , time ) ;
121+ // git_commit_time returns timestamp in s, converting to ms here
122+ callback ( null , time * 1000 ) ;
122123 }
123124 } ) ;
124125} ;
@@ -136,7 +137,7 @@ Commit.prototype.date = function(callback) {
136137 */
137138 this . time ( function ( error , time ) {
138139 if ( success ( error , callback ) ) {
139- callback ( null , new Date ( time * 1000 ) ) ;
140+ callback ( null , new Date ( time ) ) ;
140141 }
141142 } ) ;
142143} ;
You can’t perform that action at this time.
0 commit comments