doctrine/mongodb

Change Builder and Expr currentDate() method to accept string $type

jmikola opened this issue · 0 comments

See https://github.com/doctrine/mongodb/pull/212/files#r31166431:

What do you think about changing this to $type = 'date'? We should generally discourage users from using the BSON timestamp type, since it's actually more than a UNIX timestamp. A boolean option makes it very easy for them to inadvertently use it. This also keeps the method flexible if the $currentDate operator changes down the line to support additional types (e.g. date with a timezone).