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

Export / Backup results in false Date format #10213

Open
ggrames opened this issue Apr 9, 2024 · 0 comments
Open

Export / Backup results in false Date format #10213

ggrames opened this issue Apr 9, 2024 · 0 comments

Comments

@ggrames
Copy link

ggrames commented Apr 9, 2024

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

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

No branches or pull requests

1 participant