Export / Backup results in false Date format
ggrames opened this issue · 0 comments
OrientDB Version: v.2.2.29
Java Version: openjdk version "1.8.0_402"
OS: AlmaLinux release 9.3 (Shamrock Pampas Cat)
Expected behavior
correct Date format after import
Actual behavior
false Date format after import
Steps to reproduce
My problem is when i export or backup the whole database i get a different format for a date.
In my source Database i made a select and get following response for the date, which is valid:
+----+--------------------------------------------------------------------------------------------------------------------------------------------------+
|# |appointments |
+----+--------------------------------------------------------------------------------------------------------------------------------------------------+
|0 |[{duration=2, date=Sun Mar 12 23:00:00 GMT 2023, speakers=[d7cef3ae-fca4-4eed-b292-8f51a908c3b7, 3c0e8754-14b7-427a-80cf-d179b2ab92fe], groupId...|
+----+--------------------------------------------------------------------------------------------------------------------------------------------------+
Then i made a backup with "EXPORT DATABASE /tmp/mydb.gz"
I checked the json file in the .gz file an see that the date is exported as long value. This is than for me false.
When i import it back to a new database instance with "IMPORT DATABASE /tmp/mydb.gz"
and i execute the same query, i get following false date presented:
+----+------------------------------------------------------------------------------------------------------------------------------+
|# |appointments |
+----+------------------------------------------------------------------------------------------------------------------------------+
|0 |[{duration=2, date=1678662000000, speakers=[d7cef3ae-fca4-4eed-b292-8f51a908c3b7, 3c0e8754-14b7-427a-80cf-d179b2ab92fe], gr...|
+----+------------------------------------------------------------------------------------------------------------------------------+
What can i do to export and import my data correctly.
The same behavior exists if i use Backup and Restore
Thanks for help.
BR