There was a situation a few years ago when I discovered a bunch of images had the exact same filenames, but with different content and different modification times! The filenames were auto-generated by the digital camera, which I was probably resetting for some reason--so it started auto-numbering from scratch again. Also, I wanted to address the issue that different cameras had different naming conventions for their image files.
So I decided on renaming the files by prefixing a timestamp. This would directly address both issues I was having. I decided to try to be as concise as possible, so I standardized on a condensed 14-character string (well, 15 if the connecting underscore "_" is included).
// condense the timestamp into a compact string
// 14 chars, YYYYMMDDhhmmss
// 20130801133527 (August 1, 2013 13:35:27)