Giter VIP home page Giter VIP logo

alfred-epoch-converter-sg-fix's Introduction

icon

Alfred epoch converter (fix for Singapore local timestamps)

Changes from the original repo

  • Removed µs and ns values
  • Uses pytz package to convert local datetime to epoch correctly (timestamp is hardcoded to Asia/Singapore)
    • In Singapore, the original repo's timestamp is off by 30min (eg. when typing 2022-01-01 00:00:00, it returns 1640968200 for the local timestamp instead of 1640966400). This is because Singapore's timezone changed from GMT+07:30 to GMT+08:00 in 1982 (source), so the (dt - datetime.datetime.fromtimestamp(0)).total_seconds() computation is off by 30min.

Makes it easy to work with epoch timestamps!

Convert epoch timestamp to human-readable time

You can easily type an epoch timestamp with any precision and convert it into a human readable string: convert-epoch

Select the option you want, press enter, and the value is copied into your clipboard: convert-epoch-notification

If you have an epoch timestamp in your clipboard, no need to type or paste it. The workflow will recognize it for you: convert-clipboard-epoch

Convert human-readable time to epoch timestamp

You can easily type a human-readable time and convert it into an epoch timestamp with any precision: convert-time

Select the option you want, press enter, and the value is copied into your clipboard: convert-time-notification

If you have a human-readable time in your clipboard, no need to type or paste it. The workflow will recognize it for you: convert-clipboard-time

Download & installation

You can download the workflow file from GitHub, then double-click to install. The workflow is also released on Packal.

Usage

  • ts <timestamp> will guess the precision and display as human readable, both Local and GMT
  • ts <YYYY-mm-dd> will give epoch timestamps on that date, at midnight
  • ts <YYYY-mm-dd> <HH:MM:SS> will give epoch timestamps on that date, at that time (both space and T are supported as separator, seconds are optional)
  • ts <HH:MM:SS> will give epoch timestamps for today, at that time (seconds are optional)
  • ts will display the current time as a UNIX epoch timestamp with different precisions, as well as attempt converting what is in your clipboard

alfred-epoch-converter-sg-fix's People

Contributors

bebound avatar pauloavelar avatar qexpres avatar siyant avatar snooze92 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.