Thanks r-bin I tested and made some changes after testing with a layered PSD. The script saves first, which the OP may not wish, it also flattens and closes without saving at the end:
If used in a batch or Image Processor or Image Processor Pro, the alert at the end should be removed. If the script runs fast enough in a batch, it is perhaps remotely possible that two files could have the same name and time-stamp, so I have included a one-second delay, just in case (this can also be removed if it is not required).
var saveFolder = new Folder("/c/0_dafirmare/hd");
var doc = app.activeDocument;
var fileName = File.decode(doc.name);
var n = fileName.lastIndexOf(".");
// Remove the following step if you don't wish to pre-save
doc.save();
// 1 second delay in milliseconds
$.sleep(1000);
if (n > 0) fileName = fileName.substr(0, n);
var d = new Date();
// Hyphens used rather than a dot separator
fileName += "_" + ("00" + d.getHours()).slice(-2) + "hrs" + "-" + ("00" + d.getMinutes()).slice(-2) + "min" + "-" + (d.getSeconds()) + "sec";
var jpgOptions = new JPEGSaveOptions();
jpgOptions.quality = 12;
jpgOptions.embedColorProfile = true;
jpgOptions.formatOptions = FormatOptions.PROGRESSIVE;
jpgOptions.scans = 5;
jpgOptions.matte = MatteType.NONE;
doc.flatten();
doc.saveAs(new File(saveFolder + '/' + fileName + '.jpg'), jpgOptions);
doc.close(SaveOptions.DONOTSAVECHANGES);
alert('JPEG Saved!');