dolphindb 2.0.1015 → 2.0.1016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +1 -1
- package/browser.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +7 -7
package/browser.js
CHANGED
|
@@ -2039,7 +2039,7 @@ export function nanotimestamp2str(nanotimestamp, format = 'YYYY.MM.DD HH:mm:ss.S
|
|
|
2039
2039
|
assert(i_nanosecond_start !== -1, t('格式串必须包含纳秒的格式 (SSSSSSSSS)'));
|
|
2040
2040
|
const remainder = nanotimestamp % 1000000000n;
|
|
2041
2041
|
const borrow = remainder < 0n;
|
|
2042
|
-
const ms = Number(nanotimestamp / 1000000n);
|
|
2042
|
+
const ms = Number((nanotimestamp - remainder + (borrow ? -1000000000n : 0n)) / 1000000n);
|
|
2043
2043
|
return (dayjs(_datetime_formatter.format(new Date(ms))).format(format.slice(0, i_second_end)) +
|
|
2044
2044
|
format.slice(i_second_end, i_nanosecond_start) +
|
|
2045
2045
|
String(borrow ?
|