STRF_FMT_DATETIME_SHORTER

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
juanboy2k
Posts: 24
Joined: Tue Jun 09, 2020 3:22 pm

STRF_FMT_DATETIME_SHORTER

Post by juanboy2k »

I searched this topic for this string - i just updated to 1.36.20 and of course my list of recorded events doesn't have a time stamp anymore, nosireebob; it has this string:

STRF_FMT_DATETIME_SHORTER


More important, I realize that others have had this issue and I honestly tried to search for a solution here, but curiously, while getting close, I haven't figured out what is supposed to be done to fix this. Once I figure this out, is there a way to put these odd gotcha's somewhere in the "updating gotcha's" file that we might search, and find the actual solutions rather than sifting thru pages of discussion about what did and didn't (mostly) work?

I tried putting

cd /usr/share/zoneminder/www/lang
then editing the en_us.php file with:

define( "STR_FMT_DATETIME_SHORTER","%m/%d %H:%M:%S" );

and rebooted .. but no changes.

Help...

thanks,
john
Picture1.png
Picture1.png (105.05 KiB) Viewed 3033 times
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: STRF_FMT_DATETIME_SHORTER

Post by Ralphred »

juanboy2k
Posts: 24
Joined: Tue Jun 09, 2020 3:22 pm

Re: STRF_FMT_DATETIME_SHORTER

Post by juanboy2k »

in my snapshots.php file, i only have the following. What part of the updateis supposed to be added??

GNU nano 4.8 snapshots.php
<?php
require_once('includes/Snapshot.php');
require_once('includes/Filter.php');
$message = '';
$data = array();

//
// INITIALIZE AND CHECK SANITY
//

if (!canView('Snapshots'))
$message = 'Insufficient permissions for user '.$user['Username'];

$task = '';
if (empty($_REQUEST['task'])) {
$message = 'Must specify a task';
} else {
$task = $_REQUEST['task'];
}

if (empty($_REQUEST['ids'])) {
if ($task != 'query') $message = 'No snapshot id(s) supplied';
} else {
$ids = $_REQUEST['ids'];
}

if ($message) {
ajaxError($message);
return;
}
juanboy2k
Posts: 24
Joined: Tue Jun 09, 2020 3:22 pm

Re: STRF_FMT_DATETIME_SHORTER

Post by juanboy2k »

So is there any reason i couldn't just update watch.php? Doing so with the added line as indicated in the link you shared, resulted in the date/time showing up without modifying the snapshots.php?
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: STRF_FMT_DATETIME_SHORTER

Post by Ralphred »

Yeah it'll work fine just fixing watch.php, but obviously if you use snapshots at any point (until the next release) then you'll see a similar replacement of the date and timestamp with "STRF_FMT_DATETIME_SHORTER" or whatever is being passed to the deprecated strftime(). If you don't use snapshots you won't notice a difference.
Post Reply