News for hackers. Stuff that matters.
Re:Show HN: An easy way to convert time by schoen on Thursday June 29, 2017 @03:38PM (#14666233)
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-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.

Re:Show HN: An easy way to convert time by avg_dev on Thursday June 29, 2017 @03:44PM (#14666280)
I 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/404 etc.
Re:Show HN: An easy way to convert time by jrimbault on Thursday June 29, 2017 @04:44PM (#14666714)
How does this exist ? I like it.
Re:Show HN: An easy way to convert time by Prefinem on Thursday June 29, 2017 @04:54PM (#14666783)
Creator 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)

Re:Show HN: An easy way to convert time by sprt on Thursday June 29, 2017 @04:48PM (#14666738)
Over 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.
Re:Show HN: An easy way to convert time by diggan on Thursday June 29, 2017 @03:50PM (#14666322)
> 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.

Re:Show HN: An easy way to convert time by z3t4 on Thursday June 29, 2017 @05:14PM (#14666910)
back 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.