Jump to content

Unix timestamp: Fetch timestamp for any date


Recommended Posts

Download: http://cl.ly/0l210T3y2L1y

 

This workflow has three major functions, which are really only useful for developers.

  1. Fetch current unix timestamp.
  2. Convert a unix timestamp into the DATETIME format.
  3. Fetch a unix timestamp for a future date.

Examples:

  1. "ts" : 1363987228
  2. "ts 1363987228" : 2013-03-22 05:20:28 
  3. "ts next thursday" : 1364443200
  4. "ts 3/5/2013" : 1362502800
  5. "ts 1 year ago" : 1332451288

The results are displayed as a notification and copied into the clipboard.  You may optionally edit the workflow and enable pasting into the foremost application.

 

Note that this workflow uses a PHP script, and so uses the date.timezone value in your Mac's php.ini file.  If you get inaccurate timestamps, check that value (usually found at /etc/php.ini.default).

 

 

Edited by jgpippin
Link to comment
  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...