Multiple calls to new Date()
should return a fixed time
#225
Labels
behaviour mismatch
Different behaviour to Workers runtime
Milestone
In a "real" Workers environment, creating new Date objects or returning the current time always return the same value for every call while performing a request. This applies to the
new Date()
constructor, methods likeDate.now()
, etc: they return the current time (technically, the time the request was received at), and then subsequent calls return the same value. (Documentation)In Miniflare, this behavior is not observed. Instead, multiple calls to methods like
Date.now()
return different values.Ideally, Miniflare should mirror the behavior of the "real" Workers environment.
The text was updated successfully, but these errors were encountered: