Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return 'date' as unix timestamp #233

Open
MR4online opened this issue Mar 25, 2024 · 1 comment
Open

return 'date' as unix timestamp #233

MR4online opened this issue Mar 25, 2024 · 1 comment

Comments

@MR4online
Copy link

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

@KemikalGeneral
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants