GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
532 stars 76 forks source link

Is there anyway to get the createtime from Firestore as a variable and use it in my documents? #248

Closed shafnaz closed 2 years ago

shafnaz commented 2 years ago

Is your feature request related to a problem? Please describe. Can we have the option to add created time from Firestore instead of relying on OS.get_datetime(). The reason is to not depend on a system's time which can be manipulated.

Describe the solution you'd like A method get_firestore_document_create_time()

Describe alternatives you've considered I haven't tried other APIs for this, but there are. It's just requesting the time off the internet

Additional context just for convenience, while a timestamp is generated, i can just get it into a variable before the document is sent out.

WolfgangSenff commented 2 years ago

This already exists and is quite useful:

https://github.com/GodotNuts/GodotFirebase/blob/1b5d614810886d32cf5c14bc3cbd8f040c517fb0/addons/godot-firebase/firestore/firestore_document.gd#L17