# Python Datetime

> Work with dates, times, and timezones to this project's standards. Use when creating, parsing, serialising, comparing, or storing datetimes, or handling timezones.

- **Type:** Skill
- **Install:** `agentstack add skill-owenlamont-agent-skills-python-datetime`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [owenlamont](https://agentstack.voostack.com/s/owenlamont)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [owenlamont](https://github.com/owenlamont)
- **Source:** https://github.com/owenlamont/agent_skills/tree/main/skills/python-datetime

## Install

```sh
agentstack add skill-owenlamont-agent-skills-python-datetime
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Python Datetime

Standards for dates, times, and timezones, using the standard library `datetime` and
`zoneinfo`.

## Timezones

- Always use timezone-aware datetimes; never naive ones. Attach a zone at the boundary
  where a value enters the system.
- Use the standard library `zoneinfo` for timezones, not `pytz` (whose legacy
  `localize()` dance is a frequent source of bugs).

## Serialising and parsing

- Serialise with ISO 8601 via `isoformat()` and parse with `fromisoformat()` — not
  `strftime`/`strptime` with a hand-written format, and not all-digit numeric formats.
- When parsing datetimes in pandas, pass an explicit `format=` to `pd.to_datetime` rather
  than relying on inference.

## Pitfalls

- Be careful using datetimes as dict keys or set members: two values for the same instant
  can carry different `tzinfo` objects and hash differently, so a lookup silently misses.
  Normalise to one zone (e.g. UTC) first.

See `python-pandas` for typing DataFrame timestamp columns as `pd.Timestamp`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [owenlamont](https://github.com/owenlamont)
- **Source:** [owenlamont/agent_skills](https://github.com/owenlamont/agent_skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-owenlamont-agent-skills-python-datetime
- Seller: https://agentstack.voostack.com/s/owenlamont
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
