• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

Get UTC date and time

Hi, I need to get the current UTC date and time using javascript on the following format: Sun 30 Oct 2011 14:04:03,
Hw can I do that?
I'm able to get the time using the following code but not the date:
    document.write(d.getUTCHours())
    document.write(":")
    document.write(d.getUTCMinutes())
    document.write(":")
    document.write(d.getUTCSeconds())

Open in new window

0
Sindibad_123
Asked:
Sindibad_123
1 Solution
 
leakim971PluritechnicianCommented:
0
 
Sindibad_123Author Commented:
Thank u that what Im lookking for, but I need to display "GMT" instead of "UTC"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now