Example of using toGMTString() in Javascript

var now = new Date()
var ar1 = now.toGMTString().split(" ")
document.write("The current time in Greenwich is " + ar1[4])

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.