The documentation says that…
- You can use the ToLocalTime method to restore a local date and time value that was converted to UTC by the ToUniversalTime or FromFileTimeUtc method.
and goes on to say (immediately)
- However, if the original time represents an invalid time in the local time zone, it will not match the restored value.
Does the latter imply that it will only not work if the time is ‘invalid’ (whatever that means?)?
I think this demonstrates what it means for times to be invalid:
Result on my computer (you might get different results):
The time “27-03-2011 02:26:28” is invalid because they do not exist due to the clock moving forward one hour, causing that time to be skipped.