File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -99,19 +99,18 @@ module.exports = function setConvert(ax, fullLayout) {
9999 if ( ms === BADNUM ) {
100100 if ( isNumeric ( v ) ) {
101101 v = + v ;
102- // keep track of tenths of ms, that `new Date` will drop
103- // same logic as in Lib.ms2DateTime
104- var msecTenths = Math . floor ( Lib . mod ( v + 0.05 , 1 ) * 10 ) ;
105- var msRounded = Math . round ( v - msecTenths / 10 ) ;
106-
107- var d = new Date ( msRounded ) ;
108- ms = dateTime2ms ( d ) + msecTenths / 10 ;
109102 if ( msUTC ) {
110103 // For now it is only used
111104 // to fix bar length in milliseconds.
112105 // It could be applied in other places in v2
113- ms += d . getTimezoneOffset ( ) * ONEMIN ;
106+ return v ;
114107 }
108+
109+ // keep track of tenths of ms, that `new Date` will drop
110+ // same logic as in Lib.ms2DateTime
111+ var msecTenths = Math . floor ( Lib . mod ( v + 0.05 , 1 ) * 10 ) ;
112+ var msRounded = Math . round ( v - msecTenths / 10 ) ;
113+ ms = dateTime2ms ( new Date ( msRounded ) ) + msecTenths / 10 ;
115114 } else return BADNUM ;
116115 }
117116 return ms ;
You can’t perform that action at this time.
0 commit comments