datez: convert a time into several timezones

Related tags

Date and time datez
Overview

datez: convert a time into several timezones

In July, when it is 16:00 in Canberra, what time is it in Caracas, and where I am in Cambridge?

$ datez 2021-07-21.16:00:00 Australia/Canberra America/Caracas
2021-07-21.06:00:00+0000 (UTC)
2021-07-21.16:00:00+1000 (Australia/Canberra)
2021-07-21.02:00:00-0400 (America/Caracas)
2021-07-21.07:00:00+0100 (Europe/London)

install

datez is written in Rust, so use cargo install.

We have tested datez on:

  • Unix
    • macOS
    • FreeBSD
    • Debian Linux
  • Windows
    • cmd.exe
    • Powershell

usage

datez 

You should wite the time in ISO 8601 / RFC 3339 format but without a UTC offset, and list as many tz database timezone names as you want.

The time is read using the first timezone; it is converted to UTC and printed in UTC and in every timezone you listed, and in your local timezone (if possible).

The local timezone is discovered from the TZ environment variable if that is set, or by an OS-specific mechanism; it isn't an error if neither of those work, but you have to list your timezone explicitly.

On Unix, datez reads the symlink at /etc/localtime.

On Windows, datez calls Win32 GetTimeZoneInformation().

licence

This was written by Tony Finch <[email protected]>
and Ollivier Robert <[email protected]>
You may do anything with it. It has no warranty.
https://creativecommons.org/publicdomain/zero/1.0/
SPDX-License-Identifier: CC0-1.0

You might also like...
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

When - Timezones from the command line
When - Timezones from the command line

when: a timezone utility for the command line $ when "now in vienna" when is a small utility which tells you what time it is somewhere or what some t

Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

An implementation of the JSONPath A spec in Rust, with several extensions added on

Rust JSONPath Plus An implementation of the JSONPath A spec in Rust, with several extensions added on. This library also supports retrieving AST analy

Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.
Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.

Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.

Obvious Unified Compression Helper is a CLI tool to help you compress and decompress files of several formats

Ouch! ouch stands for Obvious Unified Compression Helper and is a CLI tool to help you compress and decompress files of several formats. Features Usag

A mostly drop-in replacement for mercantile written w/ rust, plus several other util(e)ities.

utiles utiles = utils + tiles A mostly drop-in replacement for mercantile written w/ rust, plus several other util(e)ities. Installation pip install u

The fastest CLI tool for prompting LLMs. Including support for prompting several LLMs at once!
The fastest CLI tool for prompting LLMs. Including support for prompting several LLMs at once!

cai - The fastest CLI tool for prompting LLMs Features Build with Rust 🦀 for supreme performance and speed! 🏎️ Support for models by Groq, OpenAI, A

 Obsidian Plugin: Convert a URL into markdown
Obsidian Plugin: Convert a URL into markdown

Obsidian Plugin: Convert a URL into markdown Transforms a URL to markdown view if the website allows it. Installation Available in the community plugi

A rust script to convert a better bibtex json file from Zotero into nice organised notes in Obsidian

Zotero to Obsidian script This is a script that takes a better bibtex JSON file exported by Zotero and generates an organised collection of reference

Convert your ascii diagram scribbles into happy little SVG

Svgbob Svgbob can create a nice graphical representation of your text diagrams. Svgbob provides a cli which takes text as an input and creates an svg

docx-you-want is a tool to convert a PDF document into a .docx file

ddocx-you-want is a tool to convert a PDF document into a .docx file ... in an unusual way. Since these two formats are inherently differ

CLI tool to convert HOCON into valid JSON or YAML written in Rust.

{hocon:vert} CLI Tool to convert HOCON into valid JSON or YAML. Under normal circumstances this is mostly not needed because hocon configs are parsed

Generate or convert random bytes into passphrases. A Rust port of niceware.

niceware My blog post: Porting Niceware to Rust A Rust port of niceware. Sections of this README have been copied from the original project. This libr

hj is a command line tool to convert HTTP/1-style text into JSON

hj hj is a command line tool to convert HTTP/1-style text into JSON. This command is inspired by yusukebe/rj, which is a standalone HTTP client that s

A Rust library to parse Blueprint files and convert them into GTK UI files

🦀 gtk-ui-builder A Rust library to parse Blueprint files and convert them into GTK UI files Inspired by the Blueprint project Example 1 - blueprints

A tool to convert old and outdated "characters" into the superior Rustcii-Encoding.

rustcii A tool to convert old and outdated "characters" into the superior Rustcii-Encoding. Speak your mind. Blazingly ( 🦀 ) fast ( 🚀 ). Github | cr

A small application to convert a 3D model in .obj format into HTML and CSS

obj-to-html is a small application that converts a 3D model in .obj format into HTML and CSS that will display that model in a web browser, spinning a

🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.
🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Marky Markdown Magician 🧙 Features Hot reload previewing 🔥 Conversion to HTML / PDF 🏭 Themes! ✨ Extensions - Math, diagrams, syntax-highlighting 🧩

Comments
  • Fix Windows timezones.

    Fix Windows timezones.

    Strings returned by most Win32 syscalls are in fact arrays of UTF16 codepoints and trailing "0000" are not stripped out when converting into OsString which messes up string conversions. In addition, some timezones are using unofficial names, try to work around that.

    opened by keltia 1
Releases(datez-0.1.0)
Owner
Tony Finch
Tony Finch
Fast abstraction for converting human-like times into milliseconds.

MS converter library Fast abstraction for converting human-like times into milliseconds. Like, are 1d to 86400000. There are two ways to calculate mil

Mikhail Panfilov 31 Nov 7, 2022
Date and time library for Rust

Chrono: Date and Time for Rust It aims to be a feature-complete superset of the time library. In particular, Chrono strictly adheres to ISO 8601. Chro

Chronotope 2.5k Jan 8, 2023
A set of tools for generating signed exchanges at serve time.

sxg-rs sxg-rs is a set of tools for generating signed exchanges at serve time: cloudflare_worker runs on Cloudflare Workers. fastly_compute runs on Fa

Google 64 Dec 26, 2022
rsdate connects to an ntp server, printing the returned time and/or sets the system clock.

?? ?? rsdate rsdate connects to an ntp server, printing the returned time and/or sets the system clock.

Wesley Moore 3 Dec 31, 2022
Time series anomaly detection for Rust

AnomalyDetection.rs Time series AnomalyDetection for Rust Learn how it works Installation Add this line to your application’s Cargo.toml under [depend

Andrew Kane 6 Nov 21, 2022
Get unix time (nanoseconds) in blazing low latency with high precision

RTSC Get unix time (nanoseconds) in blazing low latency with high precision. About 5xx faster than SystemTime::now(). Performance OS CPU benchmark rts

Ⅲx 8 Jul 14, 2022
Generate perfect code headers every time.

Generate perfect code headers every time.

t11s 111 Dec 28, 2022
A simple and fun way to view the time!

Concentric Time A simple and fun way to view the time! Screenshots Dark mode Light mode Dev This project uses Dioxus (a Rust-Wasm framework) and does

Parker McMullin 9 Oct 23, 2022
Date and time library for Rust. Feature rich, lightweight and easy-to-use.

Astrolabe Date and time library for Rust. Feature rich, lightweight and easy-to-use. Documentation | Github | Crate Example Status Astrolabe is curren

Jasmin 2 Sep 2, 2022
A plugin for Devzat that can tell the time at various timezones.

Devzat Time Teller On Devzat, people come from all around the time. It is sometime hard to know what time it is for other peoples. This plugin let you

Maxime Bouillot 3 Jun 24, 2022