Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datetime information in action entry and exit #388

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Sakib75
Copy link
Collaborator

@Sakib75 Sakib75 commented Nov 19, 2023

πŸ““ Starting TEST-0183, STEP-1, ACTION-1: 'None' πŸ““
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Field β”‚ Sub-field β”‚ Value β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ sleep β”‚ common action β”‚ 5 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
screen_capture = "none"
INFO - 19-Nov-2023 14:09:46 | Entering into function: 'Sleep'.
Sleeping for 5.0 seconds
PASSED - Sleep : common_functions
Sleeping for 5.0 seconds
INFO - 19-Nov-2023 14:09:51 | Exited from function: 'Sleep'. Runtime: 5.0066 secs.

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made.
  • Version number has been updated.
  • Required modules have been added to respective "requirements*.txt" files.
  • Relevant Test Cases added to this description (below).
  • (Team) Label with affected action categories and semver status.

Overview

Test Cases

@sazid
Copy link
Member

sazid commented Apr 30, 2024

@Sakib75 can we reverse the message so that the timestamp comes at the end? This will help when we try to parse the logs.

Also, make the timestamps as UTC-0 so that people from different timezone can share logs with the devs and the devs can parse the date time into a suitable timezone as necessary.

datetime import datetime, timezone

# Get current time in local machine timezone (not recommended for UTC)
# local_time = datetime.now()

# Get current time in UTC
utc_time = datetime.now(timezone.utc)

# Get timestamp (seconds since Unix epoch)
utc_timestamp = utc_time.timestamp()

print(f"Current UTC timestamp: {utc_timestamp}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants