Page 1 of 1

Change name of backup to one that lists in directory ordered by date

Posted: Wed Feb 10, 2021 1:23 pm
by KB1B
Hello.

Can you change the date portion of the backups to something like YYYY-mm-dd?
This would result in backup names that sort by date in a directory versus having to hunt for a backup by day number and month names.

In file: /var/www/dashboard/admin/config_backup.php
Line 104: $local_time = $dt->format('d-M-Y');
Change to: $local_time = $dt->format('Y-m-d');

Think about it ...

Thanks.

Re: Change name of backup to one that lists in directory ordered by date

Posted: Thu Feb 11, 2021 10:13 am
by MW0MWZ
I *almost* completely agree, the reason for using "M" and not "m" is to make sure that its understood that this is the month.
International date format can be confusing.

For now at least, I have set it to Y-M-d, yes I know the Months will get out of order and that will mess with your OCD (mine too); but you could always order the folder by date too :) just saying...

Re: Change name of backup to one that lists in directory ordered by date

Posted: Sat Feb 20, 2021 9:44 pm
by AA8M
I would like to upvote KB1B's request please.

I also have been making the change that KB1B mentioned to have the YYYY-MM-DD in the backup file names.

With the change you (Andy) made, now, all I have to change is the 'M' to an 'm' in the config_backup.php file. Thank you for making the change.

Thank you also for developing and maintaining Pi-Star.

Re: Change name of backup to one that lists in directory ordered by date

Posted: Sun Feb 21, 2021 12:28 pm
by MW0MWZ
AA8M wrote: Sat Feb 20, 2021 9:44 pm I would like to upvote KB1B's request please.

I also have been making the change that KB1B mentioned to have the YYYY-MM-DD in the backup file names.

With the change you (Andy) made, now, all I have to change is the 'M' to an 'm' in the config_backup.php file. Thank you for making the change.

Thank you also for developing and maintaining Pi-Star.
Yup, and my problem with that is that international date formats are different, and I don't want anyone to get confused by that.
I might swap it to the same format as the dashboard versions, those are just yyyymmdd...
What do you think ?

Re: Change name of backup to one that lists in directory ordered by date

Posted: Sun Feb 21, 2021 11:14 pm
by K2IE
yyyymmdd would work just fine in my opinion...

73

Re: Change name of backup to one that lists in directory ordered by date

Posted: Sat May 22, 2021 3:12 pm
by AA8M
MW0MWZ wrote: Sun Feb 21, 2021 12:28 pm
AA8M wrote: Sat Feb 20, 2021 9:44 pm I would like to upvote KB1B's request please.

I also have been making the change that KB1B mentioned to have the YYYY-MM-DD in the backup file names.

With the change you (Andy) made, now, all I have to change is the 'M' to an 'm' in the config_backup.php file. Thank you for making the change.

Thank you also for developing and maintaining Pi-Star.
Yup, and my problem with that is that international date formats are different, and I don't want anyone to get confused by that.
I might swap it to the same format as the dashboard versions, those are just yyyymmdd...
What do you think ?
I agree. yyyymmdd will work fine. Thank you for considering the suggestion.