PP.Date.getGMTOffset(date, colon): String;
date. Date. Date
colon. Boolean. Indicates whether an hour-minute separator should be added (colon). Optional parameter, by default it is set to False.
The getGMTOffset static method returns offset from Greenwich meantime.
To execute the example, add a link to PP.js scenario file to HTML page.
// Create the current date date = new Date(); // Get offset from Greenwich meantime newDate = PP.Date.getGMTOffset(date, true); console.log(newDate); // -> +05:00
After executing the example the offset from Greenwich meantime is obtained.
See also: