Hello,
a) InstallDate property depends on system locale
Value of the property is obtained by command 'rpm -qi redhat-release | grep Install', which is locale dependent. There is an locale independent alternative though - 'rpm -q --qf '%{INSTALLTIME}' redhat-release'. Idea of using the alternative command and implementation comes from Manabu Sakaguchi (man-sakaguchi [at] ys.jp.nec.com). Above that, this change fixes segmentation fault caused by original code - loop 'for( ptr = str ; (ptr)!=' ' ; ptr++ )' should check for the end of the string character ('like ( ptr = str ; (ptr)!='\0' && (*ptr)!=' ' ; ptr++ )') , otherwise it runs out of string boundaries and causes the crash.
b) InstallDate property is empty on recent Fedora distributions
CIM_OS_DISTRO is set to default value "Linux" on recent Fedora -> string "Red Hat" is not found in it. Nowadays all files matching glob '/etc/release' on Fedora are symbolic links and thus not found by command 'find /etc/ -maxdepth 1 -type f -name release 2>/dev/null'. There are two '*release' files in /usr/lib/ directory though, which could be used. Preferably '/usr/lib/fedora-release', because the other one ('/usr/lib/os-release') contains too much additional information. Also the package 'fedora-release' doesn't install anymore, 'fedora-release-common' should be used to guess system install date. This part of the patch was written by myself.