Skip to content

Conversation

jamestaylr
Copy link
Contributor

@jamestaylr jamestaylr commented Aug 4, 2025

Avoid microsecond format string parsing

Fixes a bug in the implementation of #680. Log creation uses std::strftime which does not support the %f format string. Instead, build the microseconds outside of strftime and append it after.

After the fix, the file names are now correclty appending microseconds (after testing):

test_prefix-2025-08-03_21-37-11.810495
test_prefix-stderr-2025-08-03_21-37-11.810495

@MisterTea
Copy link
Owner

There's a merge conflict

Fixes a bug in the implementation of MisterTea#680. Log creation uses [`std::strftime`](https://en.cppreference.com/w/cpp/chrono/c/strftime) which does not support the `%f` format string. Instead, build the microseconds outside of `strftime` and append it after.

After the fix, the file names are now correclty appending microseconds (after testing):

```
test_prefix-2025-08-03_21-37-11.810495
test_prefix-stderr-2025-08-03_21-37-11.810495
```
@jamestaylr
Copy link
Contributor Author

Before merging this, I want to do some more local testing. Will comment here after I get the chance to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants