redis-om-node icon indicating copy to clipboard operation
redis-om-node copied to clipboard

return 'date' as unix timestamp

Open MR4online opened this issue 1 year ago • 1 comments

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

MR4online avatar Mar 25 '24 12:03 MR4online

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.

KemikalGeneral avatar Mar 25 '24 13:03 KemikalGeneral