Use local time instead of UTC time as default backup filenames (#100959)
Use local time instead of UTC for the backup name
This commit is contained in:
parent
01b5854968
commit
96151e7faa
2 changed files with 21 additions and 3 deletions
|
@ -548,7 +548,7 @@ async def test_service_calls(
|
|||
|
||||
assert aioclient_mock.call_count == 30
|
||||
assert aioclient_mock.mock_calls[-1][2] == {
|
||||
"name": "2021-11-13 11:48:00",
|
||||
"name": "2021-11-13 03:48:00",
|
||||
"homeassistant": True,
|
||||
"addons": ["test"],
|
||||
"folders": ["ssl"],
|
||||
|
@ -605,6 +605,24 @@ async def test_service_calls(
|
|||
await hass.async_block_till_done()
|
||||
|
||||
assert aioclient_mock.call_count == 34
|
||||
assert aioclient_mock.mock_calls[-1][2] == {
|
||||
"name": "2021-11-13 03:48:00",
|
||||
"location": None,
|
||||
}
|
||||
|
||||
# check backup with different timezone
|
||||
await hass.config.async_update(time_zone="Europe/London")
|
||||
|
||||
await hass.services.async_call(
|
||||
"hassio",
|
||||
"backup_full",
|
||||
{
|
||||
"location": "/backup",
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert aioclient_mock.call_count == 36
|
||||
assert aioclient_mock.mock_calls[-1][2] == {
|
||||
"name": "2021-11-13 11:48:00",
|
||||
"location": None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue