<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/73849>73849</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++][test] Streaming out floating-point `sys_time` and `local_time` is bogus
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
StephanTLavavej
</td>
</tr>
</table>
<pre>
[N4964](https://isocpp.org/files/papers/N4964.pdf) \[time.clock.system.nonmembers\]/1:
> ```cpp
> template<class charT, class traits, class Duration>
> basic_ostream<charT, traits>&
> operator<<(basic_ostream<charT, traits>& os, const sys_time<Duration>& tp);
> ```
> *Constraints:* `treat_as_floating_point_v<typename Duration::rep>` is `false`, and `Duration{1} < days{1}` is `true`.
forbids:
https://github.com/llvm/llvm-project/blob/002c54a2e6cced2eb9d79608afee5fb36dcc5b98/libcxx/test/std/time/time.clock/time.clock.system/ostream.pass.cpp#L93-L98
https://github.com/llvm/llvm-project/blob/002c54a2e6cced2eb9d79608afee5fb36dcc5b98/libcxx/test/std/time/time.clock/time.clock.system/ostream.pass.cpp#L131-L136
---
And \[time.clock.local\]/2:
> ```cpp
> template<class charT, class traits, class Duration>
> basic_ostream<charT, traits>&
> operator<<(basic_ostream<charT, traits>& os, const local_time<Duration>& lt);
> ```
> *Effects:* `os << sys_time<Duration>{lt.time_since_epoch()};`
forbids:
https://github.com/llvm/llvm-project/blob/002c54a2e6cced2eb9d79608afee5fb36dcc5b98/libcxx/test/std/time/time.clock/time.clock.local/ostream.pass.cpp#L93-L98
https://github.com/llvm/llvm-project/blob/002c54a2e6cced2eb9d79608afee5fb36dcc5b98/libcxx/test/std/time/time.clock/time.clock.local/ostream.pass.cpp#L132-L137
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVs2O4ygQfprKBcXCRfzDIYfEbp9ae5m5RxjjhFlskMGtyduvsDsdz2hnNSvtYVtCIYWor34_F8J7fR2VOkJ2hqzeiTnc7HT8EpS7ifHrq3gTb-rbrrXdPV7548DzA2Q1YHkLwXlgJ8AGsNHeSucSO10Bm14b5QEbJ5ya4p9FLXFdD8gJZBVk56AHlUhj5Z-Jv_ughmS046CGNmrEGzVgk0Z8WgN9_LIXAjldl3TueRrU4IwIClgljfCeyJuYvgJWZBXDJHTwT7meJxG0HYG9PEEIaYXX8mJ9mJQYItYD5V2fvQDmWwVCrFOTCHYCVsWF5W9hELs6Y0cfiL_7S8wHsGrrF-YkOEAO7Pw34W-O8FRFnEnoMawlOcV70YFwEf7SGyuCHq8XZ_UYLm_AqnB3ahSD2iTiBOw0KRct55RoHyF6YbyKxrAiYuzi0YdCcU6hqAmwinTi7t_lp26Y5qiabAvY26nVnf-prD-20lWH29wm0g6AjTFvj23vJvtNyQDYtMa2gA2lKLODQJVLqTpULe8KntNS9EplfcvyTsqs5WUE0K38_h2wCcpHBB-6KMSkr9vaiz8I740J2LwXM3HC-yT2HbJXzvavvPzEAaQs3b-mLN9WYr_fb8VTLPnPdDVWCvNBUfyfU_Q_oOcS8C8IasLvEfSl75XcktN6srr0K_YXZxOSeH7xepTqopyVN8Ay2ivqaPLDxCek1tpEn5dZ_-R_yjASq1gj2HVH1nHGxU4d04KmWJa8THe3I6MKu-6QC0kz2qesaAVXBS_pIe5ZvtNHpMjSFDnSNMc0QUTe8qw7dF2rOO3gQNUgtEliDuLs3WnvZ3UsWHngOyNaZfwy2BFjkIDnZWEc9NNxSVw7Xz0cqNE--CdM0MEsT4KNWlbHz0BMUVaTL0vUerwSOwfymC_7Zb7E7v7o6Zw-5saGReuIaO119rt5Msd_XeQlzPiwWCL9KwAA__9Psa0W">