-
Notifications
You must be signed in to change notification settings - Fork 533
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
Unable to parse millisecond unix timestamps #560
Comments
@jszwedko Seems that Timestmap in fn parse_internal (format/parse.rs), try to consume all digits without taking into account next items/formats. I have changed it to allow for the next fixed item length, in case there is no separator between them (Nanosecond3NotDot in this case). let dt = chrono::offset::Utc.datetime_from_str("1620309579123", "%s%3f"); should return now
Can make a PR if this is a valid approach |
Nice, thanks @jgoday ! That seems like a reasonable approach to me. |
Hi! Would it be possible to include this fix in the next release? Thanks! |
Hey all,
I might be missing something, but I'm not seeing a way to use
parse_from_str
with unix timestamps that include milliseconds.I would have expected something like:
to work, but it gives:
Is this possible or could it be added? I could try taking a shot at a PR.
The text was updated successfully, but these errors were encountered: