Description
Save any variable with @Property(type: PropertyType.date)
annotation with value as DateTime.now().toUtc()
Read the same variable DateTime comes back in local time zone and UTC flag is false
-
ObjectBox version: [e.g. 0.14.0]
objectbox: ^1.2.0
objectbox_flutter_libs: ^1.2.0 -
Flutter/Dart SDK: [e.g. 2.0.0, or the output of
dart --version
orflutter --version
]
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (9 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4 -
Null-safety enabled: [yes | no]
yes -
Reproducibility: [e.g. occurred once only | occasionally without visible pattern | always]
always -
Device/Emulator: [e.g. Galaxy S20]
iPhone 8+ Simulator
Additionally, you can choose to provide more details, e.g. the output of:
Steps to reproduce
- Put any entity class having variable as date in UTC
- Read the same entity class
- DateTime comes back in local timezone
Expected behavior
Date time should be in UTC only