Julien L Posted November 27, 2018 Share Posted November 27, 2018 Unable to find a workflow that did just what I need, I finally bit the bullet and created my own. It is released on Packal and GitHub. It does 2 things: typing ts without any argument, it will display the current timestamp with different levels of precision; typing ts with a timestamp as an argument, it will display that timestamp in human-readable format, in both local and UTC timezones. Any resulting value can be selected with enter, to copy it in the clipboard. Let me know what you think: is this useful to anyone? is there anything missing? did I make a rookie mistake? Link to comment
mmoose68 Posted December 6, 2018 Share Posted December 6, 2018 Thanks man! Just installed it and it looks good so far!! Julien L 1 Link to comment
Julien L Posted February 7, 2019 Author Share Posted February 7, 2019 I have just released the version 1.0.0 on GitHub. Packal is taking a bit longer to show the latest version. The two main additions are: support converting a timestamp from the clipboard; support converting the other way (from human-readable to epoch timestamp). I would love to hear feedback / suggestions / etc. Link to comment
deanishe Posted February 7, 2019 Share Posted February 7, 2019 7 hours ago, Julien L said: I would love to hear feedback What's going on in the screenshot? …3061… from the input becomes …3096… in the output. Link to comment
Julien L Posted February 8, 2019 Author Share Posted February 8, 2019 In the output, the first 2 lines with a CLOCK_ICON are the human-readable conversions of the timestamp parameter, in local and UTC times. The other 4 lines are the "current time" as an epoch timestamp in multiple precisions. Does that make sense? Maybe this GIF helps illustrate: Link to comment
deanishe Posted February 8, 2019 Share Posted February 8, 2019 I understand what the workflow's supposed to do. I'm wondering, mathematically speaking, how it rounds up …30610… to …3096. Link to comment
Julien L Posted February 8, 2019 Author Share Posted February 8, 2019 It does not. There are two distinct timestamps involved in this timestamp: 1543323061042 that is 2018-11-27 13:51:01.42 in my timezone, or 2018-11-27 12:51:01.42 UTC these are the first 2 options displayed, converting the timestamp that is passed as a parameter to the ts workflow 1543323096449 that is 2018-11-27 13:51:36.449 in my timezone, or 2018-11-27 12:51:36.449 UTC these are the following 4 options displayed, completely unrelated to the timestamp that is passed as a parameter I understand how it can be confusing, because I took the screenshot only 35 seconds after having copied the timestamp used as an example... Hopefully the various GIFs in the current README are clearer than this single screenshot? Let me know if I should clarify anything. Link to comment
deanishe Posted February 8, 2019 Share Posted February 8, 2019 1 hour ago, Julien L said: There are two distinct timestamps involved in this timestamp This was what I hadn't understood. I thought that all the results were conversions of the entered timestamp, not an unrelated timestamp. Why do you also show the current timestamp when the user has entered their own timestamp? Link to comment
Julien L Posted February 8, 2019 Author Share Posted February 8, 2019 Quote Why do you also show the current timestamp when the user has entered their own timestamp? I thought that was the simplest / most straightforward / most obvious way; but I can see now how it gets confusing. How is this proposal, then? ts displays current epoch timestamp displays current human-readable time ts <epoch timestamp> displays only the converted human-readable time ts <human-readable time> displays only the converted epoch timestamp How should I handle the clipboard in that case? Should the clipboard conversions display only when people type ts without parameter? Thanks for thinking about this with me! Link to comment
deanishe Posted February 8, 2019 Share Posted February 8, 2019 1 hour ago, Julien L said: I thought that was the simplest / most straightforward / most obvious way; but I can see now how it gets confusing. I would say that as a rule, if the user has entered a query, almost all workflows will only show results related to that query. It might just be me who finds it a little confusing, though. 1 hour ago, Julien L said: How should I handle the clipboard in that case? Should the clipboard conversions display only when people type ts without parameter? Perhaps a separate trigger for the pasteboard? An extra "From Clipboard" item in the results if there's valid input on the clipboard? Accept the query "pb" or "cb" to parse the clipboard? Link to comment
giovanni Posted March 26, 2022 Share Posted March 26, 2022 I updated this to Python3 and created a pull request. cc @vitor vitor and Julien James 2 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now