Backup-data panel doesn't respect time zone

Pretty much what it says on the tin. I’ve had two backups complete within the past hour. My server knows the correct time zone:

[root@neth ~]# date
Sat Dec  5 07:58:57 EST 2020
[root@neth ~]#  

But it’s shown in the backup page in Cockpit in UTC:
image

3 Likes

Other modules of Cockpit are honoring the time zone you selected?

Yep:
image

It looks like a hard-coded timezone:

3 Likes

Nice catch. Which developer will bring a beer to non-UTC sysadmins for this hardcording? :smiley:

1 Like

the JS script to determine the time from unix timestamp

The UNIX timestamp should be in UTC. Wonder why it isn’t.

I cannot check it now, but this is the api to find the time of the log

It seems that the date reported is correct, but the UTC label is wrong.
If I understand well, removing the UTC hardcoded label should be enough.

What do you think?

In order of preference, here are the options I see:

  • Show the correct local time, along with the correct local time zone
  • Show the correct UTC time, along with the UTC label
  • Show the correct local time with no timezone label.

The last is probably the easiest to implement, but I’d prefer either of the other two.

1 Like

I would say the correct one is the first one.

for this one we have just to remove the UTC hardcoded label ?

My vote goes for this.

1 Like

I’d say yes, because other dates on the same page doesn’t show the timezone.

If the timezone is not explicit, the time is shown in localtime, exactly how Dan was expecting.