What is an "invalid time"?

In the header for the Time object, it says this:

/** Returns the last modification time of this file.

    @returns    the time, or an invalid time if the file doesn't exist.
    @see setLastModificationTime, getLastAccessTime, getCreationTime
Time getLastModificationTime() const;

But I don’t see any place where we can check if the time returned is invalid. What exactly is an “invalid time”?

It looks like the returned time will just be the Unix Epoch in this case. Maybe the docs could be a bit clearer here…

Ok, thanks. Looks like we already check if the file exists, anyway, so that call isn’t causing the problem we’re seeing. Thanks!

The docs have been updated here:

1 Like