3 ms·
I can see that this might be useful for interactive human use, but I'm not sure of the benefit of the API. Most popular programming languages have a library to
by schoen 9y ago
I can see that this might be useful for interactive human use, but I'm not sure of the benefit of the API. Most popular programming languages have a library to do this already without relying on a network service.
Unix command line with GNU date:
date --iso-8601=seconds
date --iso-8601=seconds -u # UTC
date --iso-8601=seconds -d @1234567890 # specified time stamp
date -d 2017-06-29T12:28:57-07:00 +%s # other direction
Python: https://stackoverflow.com/questions/2150739/iso-time-iso-8601-in-python https://stackoverflow.com/questions/2150739/iso-time-iso-860...
Using a network API for this kind of conversion function that's already built into programming languages reminds me of the left-pad controversy. You don't need to outsource basic programming tasks to third-party libraries, and you also don't need to outsource them to third-party network services.
- avg_dev 9y agoI don't think of it as an API to integrate into your service, but more of an easy to remember thing like http://http.cat/503 http://http.cat/503 http://http.cat/404 http://http.cat/404 etc.
- jrimbault 9y agoHow does this exist ? I like it.
- diggan 9y ago> but I'm not sure of the benefit of the API I agree, when talking about programming language, but maybe could be useful when using services like Zapier and similar, when you don't want to use a programming language for doing simple things or don't know programming.
- sprt 9y agoOver the years, I've noticed the best way to learn about shell one-liners is to read HN comments on programs that implement trivial functionality.
- Prefinem 9y agoCreator here. The API is definitely not useful for most programmatic things. Just a simple way to get the time if you don't have the ability to use bash or a programming language. I mostly wanted a way to copy a timestamp and type in a url to get a human readable time in local time. (https://epoch.sh/1498769628 https://epoch.sh/1498769628)
- z3t4 9y agoback in school we was tasked to write something, i dont recall what it was but it was mostly facts. i found a good paper on the internet and while rewriting it i thought to my self, why am i rewriting it? it was already written exactly as i would put it, and the facts where right. so i gave the paper i found on the internet to the teacher. but so did also one of my class mates. thats how it feels like when reusing someone elses code. it feels like cheating.