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/index.js
CHANGED
|
@@ -2034,7 +2034,7 @@ export function nanotimestamp2str(nanotimestamp, format = 'YYYY.MM.DD HH:mm:ss.S
|
|
|
2034
2034
|
assert(i_nanosecond_start !== -1, t('格式串必须包含纳秒的格式 (SSSSSSSSS)'));
|
|
2035
2035
|
const remainder = nanotimestamp % 1000000000n;
|
|
2036
2036
|
const borrow = remainder < 0n;
|
|
2037
|
-
const ms = Number(nanotimestamp / 1000000n);
|
|
2037
|
+
const ms = Number((nanotimestamp - remainder + (borrow ? -1000000000n : 0n)) / 1000000n);
|
|
2038
2038
|
return (dayjs(_datetime_formatter.format(new Date(ms))).format(format.slice(0, i_second_end)) +
|
|
2039
2039
|
format.slice(i_second_end, i_nanosecond_start) +
|
|
2040
2040
|
String(borrow ?
|