File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -437,21 +437,21 @@ proc getSecondsPart(timestamp: Time): string =
437
437
msec = timestamp.nanosecond() div 1_000_000
438
438
439
439
if sec > 0 and sec <= 9 :
440
- res[1 ] = '0' + char ( sec)
440
+ res[1 ] = chr(ord( '0' ) + sec)
441
441
elif sec >= 10 :
442
- res[0 ] = '0' + char (sec div 10 )
443
- res[1 ] = '0' + char (sec mod 10 )
442
+ res[0 ] = chr(ord( '0' ) + (sec div 10 ) )
443
+ res[1 ] = chr(ord( '0' ) + (sec mod 10 ) )
444
444
445
445
if msec > 0 and msec <= 9 :
446
- res[5 ] = '0' + char ( msec)
446
+ res[5 ] = chr(ord( '0' ) + msec)
447
447
elif msec >= 10 and msec <= 99 :
448
- res[4 ] = '0' + char (msec div 10 )
449
- res[5 ] = '0' + char (msec mod 10 )
448
+ res[4 ] = chr(ord( '0' ) + (msec div 10 ) )
449
+ res[5 ] = chr(ord( '0' ) + (msec mod 10 ) )
450
450
elif msec >= 100 :
451
451
let tmp = msec mod 100
452
- res[3 ] = '0' + char (msec div 100 )
453
- res[4 ] = '0' + char (tmp div 10 )
454
- res[5 ] = '0' + char (tmp mod 10 )
452
+ res[3 ] = chr(ord( '0' ) + (msec div 100 ) )
453
+ res[4 ] = chr(ord( '0' ) + (tmp div 10 ) )
454
+ res[5 ] = chr(ord( '0' ) + (tmp mod 10 ) )
455
455
res
456
456
457
457
proc getFastDateTimeString(): string =
You can’t perform that action at this time.
0 commit comments