Custom function returning exact OS date

Also, this code doesn’t seem to handle leap years - as feb can have 29 days in it etc

1 Like

macOS (Darwin) is a descendant of BSD, and therefore Unix, yes. Darwin isn’t the kernel, it’s a whole distribution. The kernel is called XNU.

Windows kernel is entirely home-grown and made-up. It’s not compatible with anything, let alone Unix. And it’s definitely not a descendant of anything useful. It’s been NT from the start.

No matter the operating system, those Luau functions will always behave the same (or else Luau is implemented incorrectly). Even if the OS doesn’t use epoch time, the fact that epoch time is returned is a contract of the function itself and therefore consistent across all Luau distributions (whether it’s on mobile, desktop, or now compiled from source).

3 Likes