Skip to content

Commit 6a71e94

Browse files
committed
fix(gitchangelog): substitui time.utcnow() por time.now() para precisão
1 parent 1dd79d7 commit 6a71e94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cereja/experimental/gitchangelog.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from dataclasses import dataclass
99
from typing import List, Tuple, Dict, Optional
1010

11+
from cereja import FileIO
12+
1113

1214
@dataclass
1315
class CommitInfo:
@@ -164,7 +166,7 @@ def build_markdown(branch: str, base: str, commits: List[CommitInfo], files: Lis
164166
Texto em Markdown.
165167
"""
166168
categories = categorize_files(files)
167-
now = dt.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
169+
now = dt.datetime.now(dt.UTC).strftime("%Y-%m-%d %H:%M:%S UTC")
168170
lines: List[str] = []
169171
lines.append(f"# Nota de Implementações - branch {branch}")
170172
lines.append("")
@@ -269,8 +271,7 @@ def main() -> int:
269271
content = build_json(branch, base, commits, diff_files)
270272
default_name = f"implementacoes_{branch}.json"
271273
output_path = args.output or default_name
272-
with open(output_path, "w", encoding="utf-8") as f:
273-
f.write(content)
274+
FileIO.create(output_path, content).save(exist_ok=True)
274275
print(output_path)
275276
return 0
276277
except Exception as exc: # noqa: BLE001

0 commit comments

Comments
 (0)