Skip to main content

Streamlit component that returns the user browser IANA timezone

Project description

streamlit-tz

Streamlit component that returns the user browser IANA timezone

Installation instructions

pip install streamlit-tz

Usage instructions

from datetime import datetime, UTC
from zoneinfo import ZoneInfo

import streamlit as st
from streamlit_tz import streamlit_tz


tz = streamlit_tz()
now = datetime.now(UTC)
st.write(f"Time UTC: {now}")
st.write(f"Time in {tz}: {now.astimezone(ZoneInfo(tz))}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_tz-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

streamlit_tz-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_tz-0.1.1.tar.gz.

File metadata

  • Download URL: streamlit_tz-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for streamlit_tz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ea813a46a7764d63c23e143d5210d306faa9c8aa89a7096d032c22f1aa90b40e
MD5 005d2c72bef476c703c4c5d5248459f5
BLAKE2b-256 ef976396f4f2f69d142d8c86f218489f4a916ba33c5ac004c132cc0b6333ab64

See more details on using hashes here.

File details

Details for the file streamlit_tz-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_tz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef3f7ccefd73043c605d5c6054a7ea794c449a33c0aa56062340434738de2415
MD5 8a3f485e1062b1998486b249ad277f47
BLAKE2b-256 f8017cb8aa4a3c3d042ac18436520dac17d99cb4622b7f1061f4ffe3eea31459

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page