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) {
99
99
if ( ms === BADNUM ) {
100
100
if ( isNumeric ( v ) ) {
101
101
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 ;
109
102
if ( msUTC ) {
110
103
// For now it is only used
111
104
// to fix bar length in milliseconds.
112
105
// It could be applied in other places in v2
113
- ms += d . getTimezoneOffset ( ) * ONEMIN ;
106
+ return v ;
114
107
}
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 ;
115
114
} else return BADNUM ;
116
115
}
117
116
return ms ;
You can’t perform that action at this time.
0 commit comments