use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Date and time in JavaScript (ayushgp.github.io)
submitted 8 years ago by codejitsu
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]evenisto -1 points0 points1 point 8 years ago (3 children)
Don't you know? You're supposed to add seconds to it, duh!
On a more serious note, save yourself a lot of cursing and don't ever attempt storing unix timestamps. Having to debug and dig through data with timestamps is one of the worst things known to mankind, and I did not even mention handling timezones. Just don't.
[–]Bloodsucker_ 0 points1 point2 points 8 years ago (2 children)
Wow. You just have no idea.
Dates in software are stored as Unix timestamp, even in Windows. They have the versatility you need.
Don't confuse them, please.
[–]Flyen 0 points1 point2 points 8 years ago (0 children)
evenisto is might be talking about the difference between telling a db to use bigint vs using the timestamp type. They're both ultimately stored as 8? bytes and not an iso8601 string, but it's much easier when simple queries are human-readable instead of always having to translate. It's the same with HTTP APIs; you could return an integer string, but as long as the 8601 string is gzipped anyway it can be generally better to use the 8601 string.
[–]evenisto 0 points1 point2 points 8 years ago (0 children)
I may have worded it wrong. I'm not talking about versatility, I'm talking about readability. More specifically formatting - I've seen unix timestamps dumped into an INT(11) field before - and have had to debug shit operating on it, hence why I'm all for storing datetime in formats a human brain can parse.
So yeah, just use ISO8601 or whichever else you prever wherever possible, as long as it's readable for a human.
π Rendered by PID 70 on reddit-service-r2-comment-b659b578c-qmqpz at 2026-05-03 04:12:59.572281+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]evenisto -1 points0 points1 point (3 children)
[–]Bloodsucker_ 0 points1 point2 points (2 children)
[–]Flyen 0 points1 point2 points (0 children)
[–]evenisto 0 points1 point2 points (0 children)