Skip to content

Commit b519502

Browse files
Update lib/timestamp.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mimi <stevenjoezhang@gmail.com>
1 parent 0a4bc26 commit b519502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/timestamp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function timestampFactory(defaultTimeZone: string) {
4141
const match = str.match(timestamp.test);
4242
if (!match) { throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); }
4343
const [, year, month, day, hour, minute, second] = match.map(Number);
44-
const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;
44+
const millisec = match[7] ? Number((match[7] + '00').substring(1, 4)) : 0;
4545

4646
let date = Date.UTC(
4747
year,

0 commit comments

Comments
 (0)