Hi,
I'm making a small mod to the zmvideo script to add the time and date to the Mpg file name.
Could someone suggest how to convert the unix_timestamp string from
'2007-10-04 22:23:00'
to '2007-10-24_22_23_00' in perl ?? I'm definitely not a perl expert.
Thanks in advance,
Joel
Convert Unix_timestamp string in Perl
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
You just want to substitute space and colons for underscores?
If so then this will work I think
If so then this will work I think
Code: Select all
$str = '2007-10-04 22:23:00' ;
$str =~ s/[ :]/_/g;
Phil