Skip to content

Commit

Permalink
Keep it consistent with the old time format for exporting purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wantsui committed Jan 2, 2025
1 parent eb0a15f commit f91a5a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ddtrace/internal/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def collect(tracer):
from ddtrace._trace.tracer import log

return dict(
# Timestamp UTC ISO 8601
date=datetime.datetime.now(datetime.timezone.utc).isoformat(),
# Timestamp UTC ISO 8601 with the trailing +00:00 removed
date=datetime.datetime.now(datetime.timezone.utc).isoformat()[0:-6],
# eg. "Linux", "Darwin"
os_name=platform.system(),
# eg. 12.5.0
Expand Down
4 changes: 2 additions & 2 deletions ddtrace/profiling/exporter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ def export(
"start": (
datetime.datetime.fromtimestamp(start_time_ns / 1e9, tz=datetime.timezone.utc)
.replace(microsecond=0)
.isoformat()
.isoformat()[0:-6] # removes the trailing +00:00 portion of the time
+ "Z"
),
"end": (
datetime.datetime.fromtimestamp(end_time_ns / 1e9, tz=datetime.timezone.utc)
.replace(microsecond=0)
.isoformat()
.isoformat()[0:-6] # removes the trailing +00:00 portion of the time
+ "Z"
),
} # type: Dict[str, Any]
Expand Down

0 comments on commit f91a5a3

Please sign in to comment.