You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From here:
“The text representation is always 27 characters, encoded in alphanumeric base62 that will lexicographically sort by timestamp.”
Passing in a timestamp close to the epoch can produce a bytes representation with leading zeros after the epoch has been substracted, which produces KSUIDs with a base62 representation with a length less than 27.
from ksuid import ksuid
EPOCH = int(14e8) # '2014-05-13T16:53:20'
>>> k = ksuid(EPOCH)
>>> k.toBase62()
'39kHQVbzU2HGjKozI65P4b'
>>> len(k.toBase62())
22
From here:
“The text representation is always 27 characters, encoded in alphanumeric base62 that will lexicographically sort by timestamp.”
Passing in a timestamp close to the epoch can produce a bytes representation with leading zeros after the epoch has been substracted, which produces KSUIDs with a base62 representation with a length less than 27.
In the Go implementation, a left zero padding is done.
Using the version from master.
The text was updated successfully, but these errors were encountered: