Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Get Day/Month/Year According to Universal Time (UTC) in JavaScript</title> </head> <body> <script> var d = new Date(); var date = d.getUTCDate(); var month = d.getUTCMonth() + 1; // Since getUTCMonth() returns month from 0-11 not 1-12 var year = d.getUTCFullYear(); var dateStr = date + "/" + month + "/" + year; document.write(dateStr); </script> </body> </html>