Hello when i try to convert my date to format UTC it throwing TypeError: date.toUTCString it's not a function any suggestions?

As DontVoteMeDown said: Date.now() does not return a date object, instead Date.now() returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
To get the current timestamp as a Date object
var date = new Date( Date.now() );
Or more simply (but less readable)
var date = new Date();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With