You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
Currently the way the date is created is by creating a random integer between 0 and the current timestamp. This integer represents a unix time (seconds since January 1st, 1970). So this is the reason why the amount of milliseconds will always be 0. What you could try is to use the dateTime function and then set the amount of milliseconds yourself by passing a random integer between 0 and 1000:
Yes, that seems to work as well. Maybe a function for this can be added like dateWithMicroseconds or something like that or the v format could be supported by the date function.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi all
From PHP 7.0.0 the PHP
date
function implement thev
format to print milliseconds:what is the best practice to print date like
2018-01-03T22:34:55.345
withFaker
?I try to use
$faker->date($format = 'Y-m-d\TH:i:s.v', $max = 'now')
and It works but milliseconds are always set to000
. Is this normal?Thank you.
The text was updated successfully, but these errors were encountered: