Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_gtime _t does not zero-fill as in HHMMSS format #631

Open
0ihsan opened this issue Jul 30, 2022 · 1 comment
Open

_gtime _t does not zero-fill as in HHMMSS format #631

0ihsan opened this issue Jul 30, 2022 · 1 comment

Comments

@0ihsan
Copy link

0ihsan commented Jul 30, 2022

t: -392059337
(24 60 60 _vsx t ! 86400)
100 _sv (24 60 60 _vsx t ! 86400)
_gtime t

outputs

6 37 43
63743
20220731 63743

The HHMMSS section 63743 (6 37 43) should be zero-filled like this 063743 (06 37 43)
I think _sv implementation is related to this.

@tavmem
Copy link
Collaborator

tavmem commented Aug 30, 2022

In kona:

$ rlwrap -n ./k
kona      \ for help. \\ to exit.  
  t: -392059337

  (24 60 60 _vsx t ! 86400)
6 37 43
  
  100 _sv (24 60 60 _vsx t ! 86400)
63743

  _gtime t
20220731 63743

In k2.8

$ rlwrap -n ./k
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
  t: -392059337

  (24 60 60 _vsx t ! 86400)
reserved error
(24 60 60 _vsx t ! 86400)
          ^
parse error
  
  100 _sv (24 60 60 _vsx t ! 86400)
reserved error
100 _sv (24 60 60 _vsx t ! 86400)
                  ^
parse error
  
  _gtime t
20220730 63743

In k2.8 _gtime _t does not zero-fill either.
Arguably, this is a bug in both k2.8 and kona.
On the other hand, the intent of kona was to replicate k2.8 as much as possible.
It's not clear to me whether this is a bug in kona ... or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants