Comments (5)
Maybe I'm not understanding the error properly, but this seems to be working as expected.
Isar saves dates as utc epoch microseconds, and reads them as utc epoch microseconds and then converts them to local.
I'm assuming your timezone is UTC-3?
from isar.
Talvez eu não esteja entendendo o erro corretamente, mas parece estar funcionando conforme o esperado. Isar salva datas como microssegundos da época UTC, lê-as como microssegundos da época UTC e depois as converte para locais. Presumo que seu fuso horário seja UTC-3.
Exactly, but look at the prints. The convert to local behavior does not occur on the real device, only on the emulator
from isar.
Talvez eu não esteja entendendo o erro corretamente, mas parece estar funcionando conforme o esperado. Isar salva datas como microssegundos da época UTC, lê-as como microssegundos da época UTC e depois as converte para locais. Presumo que seu fuso horário seja UTC-3.
Exactly, but look at the prints. The convert to local behavior does not occur on the real device, only on the emulator
The value that you are passing to isar is 2024-05-01T00:00:00.000Z
, which is in UTC.
Isar then returns 2024-04-30T21:00:00.000
, which is the exact same value as the input, but in your local time (UTC-3
).
from isar.
Talvez eu não esteja entendendo o erro corretamente, mas parece estar funcionando conforme o esperado. Isar salva datas como microssegundos da época UTC, lê-as como microssegundos da época UTC e depois as converte para locais. Presumo que seu fuso horário seja UTC-3.
Exactly, but look at the prints. The convert to local behavior does not occur on the real device, only on the emulator
The value that you are passing to isar is
2024-05-01T00:00:00.000Z
, which is in UTC. Isar then returns2024-04-30T21:00:00.000
, which is the exact same value as the input, but in your local time (UTC-3
).
I think I structured the issue wrong... See, I sent 6 screenshots, the first 3 are from my real device, where isar removes -3 hours, making it a UTC date as expected, but when trying to get the entered value, it is not converting to the local time, which would be +3 hours.
Now, the other 3 prints are from the emulator, where ISAR removes -3 hours at the time of insertion and adds +3 hours at the time of obtaining the Date. In this example, I understand that it is the correct way.
Another important detail is that both devices are UTC-3, as we can see at the time of insertion, but the results are different.
from isar.
I found the problem, I was saving the data with DateTime.utc
... I removed that and put the conventional DateTime
.
For some reason this was causing inconsistency between devices.
from isar.
Related Issues (20)
- .deleteAll() function is not working.
- [BUG] 🐛 Incompatible with `injectable_generator` HOT 4
- QueryBuilder and method allOf return strange result
- [M1 macOS] ld: library 'isar' not found HOT 3
- Failed to load dynamic library 'libisar.so'. HOT 5
- Release build crash on iPhone when starting HOT 1
- Add support for Time to Live
- Flutter web not found HOT 1
- Query by List of index-entries HOT 2
- [v4] Association processing
- Add CLI for isar library downloading
- unique index exception has to be more specific to the field
- please support flutter sdk 3.22 HOT 5
- QueryBuilder lead Native memory leaks
- [v4] IsarError: Illegal Argument HOT 3
- Each architecture generates libisar.so
- isar ERROR
- Isar Not Generating .g file ( 0 outputs on build)! HOT 1
- master channel ,Android cannot build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isar.