Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /avinash-mall_CognitiveMemoryLayer /src /storage /utils.py
| """Shared storage utilities (e.g. datetime normalization for PostgreSQL).""" | |
| from datetime import UTC, datetime | |
| def naive_utc(dt: datetime | None) -> datetime | None: | |
| """Convert to naive UTC for PostgreSQL TIMESTAMP WITHOUT TIME ZONE.""" | |
| if dt is None: | |
| return None | |
| if dt.tzinfo: | |
| return dt.astimezone(UTC).replace(tzinfo=None) | |
| return dt | |
Xet Storage Details
- Size:
- 371 Bytes
- Xet hash:
- 9f8480921dfa4be7af54844b8057b854aaaada0633bb29823e78d3cb124ddd83
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.