Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions awscli/customizations/ecs/expressgateway/display_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ def execute_monitoring(self, collector, start_time, timeout_minutes):
break

try:
self.stream_display.show_polling_message()

collector.get_current_view("")

# Extract cached result for diff detection
Expand Down
8 changes: 4 additions & 4 deletions awscli/customizations/ecs/expressgateway/managedresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# language governing permissions and limitations under the License.

import sys
from datetime import datetime
from datetime import datetime, timezone

import dateutil.parser

Expand Down Expand Up @@ -155,9 +155,9 @@ def get_stream_string(self, timestamp, use_color=True):
lines.append(f" Reason: {self.reason}")

if self.updated_at:
updated_time = datetime.fromtimestamp(self.updated_at).strftime(
"%Y-%m-%d %H:%M:%S"
)
updated_time = datetime.fromtimestamp(
self.updated_at, tz=timezone.utc
).strftime("%Y-%m-%d %H:%M:%SZ")
lines.append(f" Last Updated At: {updated_time}")

if self.additional_info:
Expand Down
3 changes: 2 additions & 1 deletion awscli/customizations/ecs/expressgateway/stream_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Stream display implementation for ECS Express Gateway Service monitoring."""

import time
from datetime import datetime, timezone

from awscli.customizations.ecs.expressgateway.managedresourcegroup import (
ManagedResourceGroup,
Expand Down Expand Up @@ -108,4 +109,4 @@ def show_error_message(self, error):

def _get_timestamp(self):
"""Get formatted timestamp."""
return time.strftime("%Y-%m-%d %H:%M:%S")
return datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%SZ")
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ def test_execute_with_mock_collector(self, mock_sleep, capsys):
output = capsys.readouterr().out
printed_output = output
assert "Starting monitoring" in printed_output
assert "Polling for updates" in printed_output
assert "stopped by user" in printed_output
assert "complete" in printed_output

Expand Down
Loading