Skip to content

Commit 7b2cf8e

Browse files
committed
Tidy & fix deprecation warning
1 parent 9d56622 commit 7b2cf8e

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

cylc/flow/tui/util.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -384,19 +384,6 @@ def get_task_status_summary(flow):
384384
]
385385

386386

387-
def get_workflow_status_str(flow):
388-
"""Return a workflow status string for the header.
389-
390-
Arguments:
391-
flow (dict):
392-
GraphQL JSON response for this workflow.
393-
394-
Returns:
395-
list - Text list for the urwid.Text widget.
396-
397-
"""
398-
399-
400387
def _render_user(node, data):
401388
return f'~{ME}'
402389

cylc/flow/wallclock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"""Wall clock related utilities."""
1717

1818
from calendar import timegm
19-
from datetime import datetime, timedelta
19+
from datetime import datetime, timedelta, timezone
2020

2121
from metomi.isodatetime.timezone import (
2222
get_local_time_zone_format, get_local_time_zone, TimeZoneFormatMode)
@@ -209,7 +209,7 @@ def get_time_string_from_unix_time(unix_time, display_sub_seconds=False,
209209
to use as the time zone designator.
210210
211211
"""
212-
date_time = datetime.utcfromtimestamp(unix_time)
212+
date_time = datetime.fromtimestamp(unix_time, timezone.utc)
213213
return get_time_string(date_time,
214214
display_sub_seconds=display_sub_seconds,
215215
use_basic_format=use_basic_format,

0 commit comments

Comments
 (0)