Hey Shaun,
I think you've confused a few things here, so let me back up and explain. Cloud Firestore has support for fields that contain a Date/Time. When the product first came out in Beta this meant that we recommended you use the native Date object on your platform of choice. However there are differences in how each platform (Android, iOS, Web, etc) handles Dates so we decided to make a new Firestore-specific "Timestamp" type and encourage developers to use that whenever possible to make sure we get cross-platform and round-trip consistency.
So where you previously had:
var now = Date.now();
You now want to use:
var now = admin.firestore.Timestamp.fromDate(Date.now())
Note that none of this is specific to Cloud Functions. This is a change in Cloud Firestore. You have mentioned this setting:
admin.firestore().settings({timestampsInSnapshots : true})
This means that even if you do put a Date() object into Firestore, when you read that field back you will get a Firestore Timestamp type. This will be the default in the future so it's best to enable it now and learn to work with it.
- Sam