Update from_time method to be cross-platform as well