How does one parse an iso8601 string to eos time_point format?

1 Answer 1


This example does not work:

void show(const std::string& time_str)
    const time_point& current_time = time_point::from_iso_string(time_str);

time_point::from_iso_string was cut out from eos time_point. According to this issue one should not parse strings in smart contract at all. As instead, binary data should be used and passed to parameters for the sake of performance.

  • You should probably include this info as part of the question rather than an answer. Commented Sep 25, 2018 at 19:14
  • This is answering my own question, as it states, that one should not do such thing per devs recommendation. Commented Sep 25, 2018 at 19:57
  • 1
    I see I misread this. Commented Sep 25, 2018 at 20:23
  • 1
    If you really really need to do this I suggest you copy-paste old from_iso_string implementation from the Git history and use it as a private method in your code. Commented Sep 27, 2018 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.