v0.18.0 - Timezone Support for Filename Generation (2026-03-05)¶
What Changed?¶
This release adds timezone-aware filename generation to the workspace module.
A new get_timezone() function resolves the local timezone from the
KAZUNOKO_TZ environment variable, falling back to the system timezone
detected by pendulum. The generate_filename() function now uses this
timezone when constructing timestamps, ensuring filenames reflect the correct
local time regardless of the system's UTC offset.
What's New¶
Main Feature: get_timezone() in kazunoko.workspace¶
What it does:
Resolves the IANA timezone name to use for filename timestamps. The timezone
is read from the KAZUNOKO_TZ environment variable. If not set, it falls back
to the system local timezone detected by pendulum.local_timezone().
How to use it:
from kazunoko import get_timezone, generate_filename
# Prints system timezone (e.g. "Asia/Tokyo")
print(get_timezone())
# Override via environment variable
# export KAZUNOKO_TZ=UTC
print(get_timezone()) # -> "UTC"
# generate_filename() automatically uses get_timezone()
path = generate_filename("AA:BB:CC:DD:EE:FF", file_id=0)
What's Different from the Last Version?¶
✅ Added¶
get_timezone(): new function inkazunoko.workspaceand exported from the top-levelkazunokopackagependulumadded as a core dependency for reliable timezone detectionKAZUNOKO_TZenvironment variable support for overriding the local timezone
🔧 Changed¶
generate_filename(): usespendulum.now(get_timezone())instead ofdatetime.now()for timezone-aware timestamp generation
Installation¶
Quick Start¶
# Get the release
git checkout 0.18.0
# Setup
uv sync
# Run CLI
uv run kazunoko --help
Is It Safe to Upgrade?¶
Backward Compatible: Yes
generate_filename()output format is unchanged- Without
KAZUNOKO_TZset, filenames reflect the same local time as before - No changes to CLI options or behavior
Tests Passed¶
- ✅ Builds without errors
- ✅
uvx ruff check src/passes - ✅ Pre-commit hooks pass
Release Details¶
- Date: 2026-03-05
- Version: v0.18.0
- Files Changed: 4
- Commits:
19595bf,2b8154d,8caf2c0
Next Steps¶
- Add
get_timezone()usage to example scripts where needed - Consider exposing
KAZUNOKO_TZin the CLI as a global option