elastic / elastic/ml-cpp

Investigate replacing strptime() with std::chrono::parse

Open
#1,459 1 comment 0 reactions 0 assignees View on GitHub
:ml
Dominant language
C++
Stars
157
Forks
67
Avg merge
12h 48m
Merged PRs (30d)
16

Description

Currently we are using the `strptime()` C function for time parsing. This is a pain, as it requires workaround for Linux and Windows, so is one of our least platform independent pieces of code.

In theory [`std::chrono::parse`](https://en.cppreference.com/w/cpp/chrono/parse) might be better. However some investigation is required to find out if `std::chrono::parse` is as portable as it should be. Given what we found with `strptime()` Linux and Windows are the platforms most likely to not implement the standard fully, with timezone support being the likely problematic area.

If the portability _is_ better then we should remove our `strptime()` wrapper code and all uses of it and replace them with `std::chrono::parse`. If workarounds would still be required then we might as well stick with what we've got until the C++ library _is_ consistent.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.