?
Solved

Get UTC date and time

Posted on 2011-10-30
2
Medium Priority
?
504 Views
Last Modified: 2012-05-12
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
Comment
Question by:Sindibad_123
2 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 1000 total points
ID: 37053126
0
 

Author Comment

by:Sindibad_123
ID: 37053212
Thank u that what Im lookking for, but I need to display "GMT" instead of "UTC"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question