Why is time_t defined as a 32-bit type on Windows?

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Aug 5 16:13:19 UTC 2020


```
C:\dev> rdmd -m64 --eval="import core.stdc.time; 
writeln(time_t.sizeof);"
4
```

According to MSDN this should not be the case:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019

> time is a wrapper for _time64 and **time_t is, by default, 
> equivalent to __time64_t**.

But in Druntime it's defined as a 32-bit type: 
https://github.com/dlang/druntime/blob/349d63750d55d078426d4f433cba512625f8a3a3/src/core/sys/windows/stdc/time.d#L42


More information about the Digitalmars-d-learn mailing list