boostorg / boostorg/date_time

Issue in std::basic_string<charT> to_simple_string_type(time_duration td) with locales

Open
#200 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
70
Forks
99
PR merge metrics
No merged PRs in 30d

Description

There is a problem std::basic_string to_simple_string_type(time_duration td) if application doesn't use the locale("C").

If you use spanish locale the result of this function is like this one:
2020-11-03T09:26:04.966.395
where the second 'dot' is wrong because is the miles signal in spanish locale.

I propose to correct it, use next code:
```
std::basic_ostringstream ss;
ss.imbue(std::locale::classic());

```

Best regards

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.