<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/125196>125196</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc] Implement 64bit `time_t` and `localtime`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zimirza
      </td>
    </tr>
</table>

<pre>
    It might be good to implement a 64bit `time_t` and `localtime`/`localtime_s`. According to https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64, these are defined as:

```c
struct tm *localtime( const time_t *sourceTime );
struct tm *_localtime32( const __time32_t *sourceTime );
struct tm *_localtime64( const __time64_t *sourceTime );
```

It would be good to be consistent for compatibility reasons.

This should be implemented after https://github.com/llvm/llvm-project/pull/110363 gets merged and https://github.com/llvm/llvm-project/issues/107597 is completed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykk1FvqzgQhX-NeRkF2SY48MBDuhVS3_seGXsCXhmM7KGr9tevTLZJt9KVbnUlK7EG_HHOjI9OyY0LYsfqJ1Y_F3qjKcTuw80ufuhiCPa9eyGY3TgRDAhjCBYogJtXjzMuBBrUcXAETHFyM16IKQ56sbngg9E-V5niTPZfK5fEFC_hbEyI1i1jhk5Ea2LVOb8qe486LuXsTAwpXKk0YWayx-WwJSZ7s6759xC3JeMO3g1Rx3cm-4hXjLgYzIzPzx3uu0o-9urI5F9AEyYEHREsXt2CFvSugu9L8dsyjJ8Txc0Q0AxMnh_mZAMmLIng1oD8MIUtGnx1MwKTLauevp--fBH0AFwut8qPIdnJ_yHq-GvI3dTN4wvBP2Hz9uuAB9xpLlEe8jVEMGFeNbnBeUfvEFGnsKTyRnidXII0fULutyP38koYv412dDRtw38T9f7t8--wxvA3GmKyXzfvmeyF4JWqYERKMGMcM3CxP8e5lDbM90bwU92ewKXdj0dCWxa2q2xbtbrATpyqphJN08pi6qyt2xoFCiHqI55O9tTo1ohTbSrd6EoXrpNc1lxUQnApKlm2SjRCterKh1odpWJHjrN2vsx6yhDHYlfSCVmLVhVeD-jTHj4pvRsMkzLHMHa7_mEbEzty7xKlB4Ec-T2w-4H6GV7uYfy9KBZb9N0ftPCm_a2T_wYAAP__ycZe-w">