Relative Content

Tag Archive for javascriptdatecesiumjs

Use UTC DATE object rather than local date object

I am trying to show current UTC time rather than the local time using new Date(). Using (new Date()).toUTCString() does give the UTC string but I need the UTC object as I need to pass the value to other libraries as internally the libraries converts it into Date Object. So everytime, I convert it into UTC time, when the string is wrapped into new Date, it again shows the local time +GMT+200. Is their anyway I can get +GMT000 date object irrespective of the timezone I am in.