yashovardhan99 / HealersDiary

Healers Diary - an android app for healers to keep track of their patients and help in instant billing. The app is currently in development.
https://play.google.com/store/apps/details?id=com.yashovardhan99.healersdiary&utm_source=github&utm_campaign=github&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1
Apache License 2.0
8 stars 0 forks source link

ExportWorker not exporting payment time in millis #66

Closed yashovardhan99 closed 2 years ago

yashovardhan99 commented 2 years ago

Describe the bug When exporting payments, export worker uses payment.time - This is a LocalDateTime object which is converted to string and written as it is. This causes issues when importing as the ImportWorker expects all time to be in millis.

To Reproduce Steps to reproduce the behavior:

  1. Go to Backup & Sync
  2. Export payments (with patients if required)
  3. Clear app data
  4. Go to Backup & Sync again
  5. Import the payments which were exported in step 2
  6. The payments will fail to import

Expected behavior Payments should be imported without failure.

Additional context Changing payment.time to payment.time.toEpochMilli() fixes the bug.