Skip to content

Commit d390d32

Browse files
fix: changeTime is already in milliseconds (#3198)
We need to pass the timestamp in milliseconds to the date constructor, this code was assuming that changeTime was in seconds and needed to be multiplied by 1000 to get milliseconds but it is already in milliseconds. This led to the constructed date being incorrect.
1 parent f03c0a6 commit d390d32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/webpack-cli/src/plugins/CLIPlugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class CLIPlugin {
9393
});
9494

9595
compiler.hooks.invalid.tap(pluginName, (filename, changeTime) => {
96-
const date = new Date(changeTime * 1000);
96+
const date = new Date(changeTime);
9797

9898
this.logger.log(`File '${filename}' was modified`);
9999
this.logger.log(`Changed time is ${date} (timestamp is ${changeTime})`);

0 commit comments

Comments
 (0)