Repository: borgbackup/borg

Issue:
stats no longer shows day of week
borg 0.29.0

When using create --stats  the output no longer shows the day of the week.

0.28.2 output:
Keeping archive: panda-121415_1835                    Mon Dec 14 18:35:50 2015
Keeping archive: panda-121415_0925                    Mon Dec 14 09:26:27 2015
Keeping archive: panda-121315_1835                    Sun Dec 13 18:36:03 2015
....
0.29.0 output:
Keeping archive: panda-121515_1537                    2015-12-15 15:37:50
Keeping archive: panda-121515_0654                    2015-12-15 06:55:36
Keeping archive: panda-121415_1835                    2015-12-14 18:35:50
Keeping archive: panda-121315_1835                    2015-12-13 18:36:03
....



Discussion:
Yes, we use a iso-8601 like format without weekday now. Is that a problem?

The day of the week helped provide context to the date.  It is useful in seeing the prune schedule at work. Generally I see loss of information as a negative and therefore something that should be left to the end user to decide.

So, which shall it be?:

a) Sun, 2015-12-20 23:59:59
b) 2015-12-20 23:59:59 (Sun)

My preference would be a), but as long as the day of the week is present I will be happy. Thanks for taking a look at this.

I'm happy to see the iso standard for the date. Thank you for your efforts to have this in v29.

I'd also prefer option a.

I don't want to throw this discussion off track,  but I've been following
the thread and was wondering if "X days ago" kind of reporting might not be
more generally informative? Although the OP seems to have a particular
desire to know the name of the day of the week that an archive was
constructed, perhaps even more users would find value in output which
stated the days/hours sine the present when the archive was made?
On 19 Dec 2015 2:34 am, "jungle-boogie" notifications@github.com wrote:

> I'm happy to see the iso standard for the date. Thank you for your efforts
> to have this in v29.
> 
> I'd also prefer option a.
> 
> —
> Reply to this email directly or view it on GitHub
> https://github.com/borgbackup/borg/issues/496#issuecomment-165807518.

BTW, I hate "x TIMEUNIT ago" (in general).

I want to have precise timestamps without having to do clock/calendar calculations (and then still not having a precise value).

Why not formatting date according to current locale ?

> Why not formatting date according to current locale ?

Not in favor of that. iso 8601 is good.

I think using current locale is not a bad idea, as it is the point of the i18n/L10n sequence. The issue with regards to Borg is that,  as far as I understand, there is no global config file to hold user preferences. 

#TW I agree,  TIME ago tends to make me more confused then enlightened.  

@tconstans there is currently no l10n/i18n in borg. English is used because it is the de-facto international language (and esp. system administration language) and iso 8601 is used now as the standardized international date/time format (rather than using the confused/confusing british/american way of writing date and time).

The iso 8601 way of date/time formatting has a logical order from big to small units (left to right) and (because of that) it also sorts correctly without further effort.


Resolving patch:
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -462,7 +462,7 @@ def dir_is_tagged(path, exclude_caches, exclude_if_present):
 def format_time(t):
     """use ISO-8601 date and time format
     """
-    return t.strftime('%Y-%m-%d %H:%M:%S')
+    return t.strftime('%a, %Y-%m-%d %H:%M:%S')
 
 
 def format_timedelta(td):


Test patch: