aaronshaf/dynamodb-admin

UI assumes epochs are in milliseconds

Opened this issue · 1 comments

Hello,
I have noticed that it seems when an epoch is rendered in the table view, it seems to assume that the epoch is in milliseconds (a javascript thing) rather than seconds.

I'm storing an expiry time as a TTL value for dynamoDB, which is always a value in seconds. When I hover over the value, the popup will always show a date in 1970.

I guess there's no real way of knowing which time format is being used in the table, and either way some users are going to miss out? Question is do more people use milliseconds or seconds for the epoch?

Just thought it was worth mentioning

image

31K years in future will make you still 12 symbols in seconds
3K years in future will make you still 11 symbols in seconds

so i would argue it's quite safe to assume if timestamp is 11 symbols or longer, that's milliseconds.

also could check if it's 1970, probably wrong format picked.

couple simple if cases and issue would be resolved :)