File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/firestore/src/remote Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -207,11 +207,15 @@ export class JsonProtoSerializer {
207
207
* to actually return a Timestamp proto.
208
208
*/
209
209
private toTimestamp ( timestamp : Timestamp ) : string {
210
- return {
211
- seconds : '' + timestamp . seconds ,
212
- nanos : timestamp . nanoseconds
213
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
214
- } as any ;
210
+ if ( this . options . useProto3Json ) {
211
+ return timestamp . toDate ( ) . toISOString ( ) ;
212
+ } else {
213
+ return {
214
+ seconds : '' + timestamp . seconds ,
215
+ nanos : timestamp . nanoseconds
216
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
217
+ } as any ;
218
+ }
215
219
}
216
220
217
221
private fromTimestamp ( date : string | TimestampProto ) : Timestamp {
You can’t perform that action at this time.
0 commit comments