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

How to save date in Angular as a timestamp to Firestore #564

Closed
7 of 16 tasks
SureshKumarToverto opened this issue Feb 19, 2024 · 1 comment
Closed
7 of 16 tasks

How to save date in Angular as a timestamp to Firestore #564

SureshKumarToverto opened this issue Feb 19, 2024 · 1 comment
Labels
bug/fix Something isn't working duplicate This issue or pull request already exists package: firestore platform: android Android platform

Comments

@SureshKumarToverto
Copy link

SureshKumarToverto commented Feb 19, 2024

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

5.4.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

createdOn= new Date();
// gives such result in firestore with string type
// createdOn: "2018-11-16T09:48:51.137Z"

image

Expected behavior

what is the best way to save date as a timestamp
createdOn

image

Reproduction

https://github.com/capawesome-team/capacitor-firebase/tree/main/packages/firestore

Steps to reproduce

import { FirebaseFirestore } from '@capacitor-firebase/firestore';
this.logDataGlobal.createdOn = Date.now();
this.logDataGlobal.uuid = deviceId.identifier;
this.logDataGlobal.username = localStorage.getItem('username');
this.logDataGlobal.activestatus = true;

addFirebase(logDatas): void {
FirebaseFirestore.addDocument({
reference: 'mlogs',
data: logDatas,
});
}

Other information

No response

Capacitor doctor

ionic cap build android

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@SureshKumarToverto SureshKumarToverto added bug/fix Something isn't working needs: triage labels Feb 19, 2024
@robingenz
Copy link
Member

This is currently a bug in Capacitor (see ionic-team/capacitor#7252). I close this as duplicate of #474.

@robingenz robingenz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2024
@robingenz robingenz added platform: android Android platform package: firestore duplicate This issue or pull request already exists and removed needs: triage labels Feb 19, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working duplicate This issue or pull request already exists package: firestore platform: android Android platform
Projects
None yet
Development

No branches or pull requests

2 participants