I'm developing two native apps in android and iOS (swift3) and some of my classes use Date object, but when I save a Date object from android into Firebase Realtime Database the structure is something like this:
creationDate: {
date: 3
day: 2
hours: 17
minutes: 27
month: 9
seconds: 43
time: 1507062463000
timezoneOffset: 180
year: 117
}
But this is not a common structure in iOS (by my searches off course).
What is a better solution:
- Create a encoder/decoder in iOS to read and write this structure?
- Change read and write in android to save in firebase with iso date? Something like this (yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ)
Thanks