Jump to content

Datetime Format Converter - Convert between unix timestamps and datetime strings


Recommended Posts

Posted (edited)

Here's a workflow that's useful for developers; it allows you to convert between timestamps and formatted datetime strings with ease.

 

Simply type "df" followed by: "now", a UTC unix timestamp, or a formatted datetime string.

 

This will present you with the parsed date in various formats ready to copy to your clipboard.

 

Download

 

screenshot_1.png

screenshot_2.png

screenshot_3.png

Edited by mwaterfall
  • 2 weeks later...
Posted (edited)

Hi,

nice workflow, but i habe a little problem with my timezone. df now give me my time - 2 hours (Germany / Summertime).

Mayby you can fix it?

 

THX

Sven

Edited by 7samurai
Posted

OK, you just replaced Epochulator on my Macs. Too late to save me the 99¢ but the 11MB of memory and the space in my toolbar is appreciated. Awesome, and thank you!

Posted

Thank you, but now its gone wilder. 17:45 local shows with "now" 15:45, with tz: 13:45.

 

Can you grap the system time?

 

Greetings

Sven

 

Hmm, let me have a look. You are in germany right? CEST = +0200 UTC?

 

"now" always shows UTC, so that looks right. My tz looks wrong.

Posted

Thank you, but now its gone wilder. 17:45 local shows with "now" 15:45, with tz: 13:45.

 

Can you grap the system time?

 

Greetings

Sven

 

Can you show me the output you get from:

 

 

 

ls -l /etc/localtime
 

thanks

Posted

lrwxr-xr-x  1 root  wheel  33 11 Okt  2012 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin

 

With your latest script "df tz now" shows the correct time, "df now" shows current time -2 h

  • 11 months later...
Posted

Nice one!

 

Would be nice if it could take the local time zone as default instead of UTC. I'm in sweden so that's UTC+2.

 

Keep it up!

 

:ola

  • 2 years later...
  • 1 year later...
  • 1 year later...
  • 3 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...