Hacker News
new
past
comments
ask
show
jobs
points
by
JSR_FDED
18 hours ago
|
comments
by
yepyoukno
18 hours ago
|
[-]
Oh yes, I meant don’t store as an ID in its string format!
reply
by
dexterdog
16 hours ago
|
parent
|
[-]
It's just s dumb as storing dates as strings, but people still do it.
reply
by
littlecranky67
12 hours ago
|
parent
|
next
[-]
But SQLite does not have a native datetime type so you have to use strings
reply
by
voakbasda
11 hours ago
|
parent
|
[-]
You can use an integer
reply
by
Volundr
4 hours ago
|
parent
|
next
[-]
How do I know the time zone of an integer? Sure there are plenty of cases where one doesn't care, but there are also many cases where the original time zone is important.
reply
by
dexterdog
1 hours ago
|
parent
|
[-]
The integer is a UTC time so it can be sorted. If you need the time zone you store than in a smaller field.
reply
by
littlecranky67
4 hours ago
|
parent
|
prev
|
[-]
other comment said it already, timezone information is not saved. Easiest is just to use a string.
reply
by
cenamus
12 hours ago
|
parent
|
prev
|
[-]
But also one of the recommended ways of doing it, as it has no native Datetime type.
reply