File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -173,11 +173,15 @@ common.refreshTmpDir();
173173const path = `${ common . tmpDir } /test-utimes-precision` ;
174174fs . writeFileSync ( path , '' ) ;
175175
176- // test Y2K38 for all platforms
177- const Y2K38_mtime = 2 ** 31 ;
178- fs . utimesSync ( path , Y2K38_mtime , Y2K38_mtime ) ;
179- const Y2K38_stats = fs . statSync ( path ) ;
180- assert . strictEqual ( Y2K38_mtime , Y2K38_stats . mtime . getTime ( ) / 1000 ) ;
176+ // test Y2K38 for all platforms [except 'arm', and 'smartOS']
177+ if ( process . arch !== 'arm' && process . platform !== 'sunos' ) {
178+ // because 2 ** 31 doesn't look right
179+ // eslint-disable-next-line space-infix-ops
180+ const Y2K38_mtime = 2 ** 31 ;
181+ fs . utimesSync ( path , Y2K38_mtime , Y2K38_mtime ) ;
182+ const Y2K38_stats = fs . statSync ( path ) ;
183+ assert . strictEqual ( Y2K38_mtime , Y2K38_stats . mtime . getTime ( ) / 1000 ) ;
184+ }
181185
182186if ( common . isWindows ) {
183187 // this value would get converted to (double)1713037251359.9998
You can’t perform that action at this time.
0 commit comments