redis-om-node
redis-om-node copied to clipboard
return 'date' as unix timestamp
if I'm correct, all Entities with type date are saved as numbers (unix timestamps) in the redis json object.
when reading the date, it is converted to JS Date() Objects.
I like to work with timestamps, so i currently have to convert them back from Date() -> Timstamp.
If I would just use number Entities, I would loose advanced search capabilities as well.
I wish:
new option in the schema definition for keeping the date as number
I only use a number type for dates, and I have never had any issues, you can then use all the normal number logic on dates.