-5

How to display the UTC format for the current system.. example, the output will show like this,

GMT GMT + 1.00 like that

  • 2
    Questions asking for code should **demonstrate a minimal understanding of the problem being solved**. Include attempted solutions, why they didn't work, and the expected results. See also: [Stack Overflow question checklist](http://meta.stackoverflow.com/questions/156810/stack-overflow-question-checklist) . – John Conde Jun 18 '14 at 00:56

1 Answers1

0

You need to look into using the JavaScript Date object.

var theDate = new Date(); //outputs current date/time
var theDate2 = new Date("01/02/2010"); //outputs the passed date and time (time will default to 12:00 or 00:00. I can't remember)

From W3 Schools

var d = new Date();
var d = new Date(milliseconds);
var d = new Date(dateString);
var d = new Date(year, month, day, hours, minutes, seconds, milliseconds);

http://www.w3schools.com/jsref/jsref_obj_date.asp

This is not jQuery but I don't understand what you're trying to accomplish yet so I can only provide the basic guidance.

Looks like you could also benefit from utilizing the .getUTCDate() property of the Date object as well: http://www.w3schools.com/jsref/jsref_getutcdate.asp

mwilson
  • 12,295
  • 7
  • 55
  • 95