D-Programming-Language/phobos — pull request #518 by CyberShadow (2012-04-03 22:52:29+00:00)
Title: std.datetime: Remove redundant SYSTEMTIME step when converting FILETIME

Both FILETIME and StdTime store time as the number of elapsed hnsecs since a certain (different) epoch. Therefore, the optimal way to convert between the two would be simply adding/subtracting the epoch difference. This is not what std.datetime used to do - instead, it FILETIME values were converted to SYSTEMTIME (a structure with year/month/day/etc. fields), and then created the SysTime result from that (and vice-versa), which was very inefficient.

The "add epoch difference" method was already used in SysTime.currStdTime. It has been refactored out and used in FILETIME conversion functions.