Skip to content

Commit cf61366

Browse files
authored
Use local timezone in console logging (#1255)
1 parent 1fd25cb commit cf61366

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logfire/_internal/exporters/console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
from collections.abc import Mapping, Sequence
1212
from dataclasses import dataclass
13-
from datetime import datetime, timezone
13+
from datetime import datetime
1414
from textwrap import indent as indent_text
1515
from typing import Any, Literal, TextIO, cast
1616

@@ -195,7 +195,7 @@ def _span_text_parts(self, span: Record, indent: int) -> tuple[str, TextParts]:
195195
"""
196196
parts: TextParts = []
197197
if self._include_timestamp:
198-
ts = datetime.fromtimestamp(span.timestamp / ONE_SECOND_IN_NANOSECONDS, tz=timezone.utc)
198+
ts = datetime.fromtimestamp(span.timestamp / ONE_SECOND_IN_NANOSECONDS)
199199
# ugly though it is, `[:-3]` is the simplest way to convert microseconds -> milliseconds
200200
ts_str = f'{ts:%H:%M:%S.%f}'[:-3]
201201
parts += [(ts_str, 'green'), (' ', '')]

0 commit comments

Comments
 (0)