Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
let currentDate = new Date();
result = currentDate.getHours();
This is not returning server time. How to get server tdate and time in thingworx
Solved! Go to Solution.
Both new Date() and Date.now() do return server time. Mind you, when you do getHour(), it returns you the hour in the server time zone, which is often UTC, and might not be what you expect.
Both new Date() and Date.now() do return server time. Mind you, when you do getHour(), it returns you the hour in the server time zone, which is often UTC, and might not be what you expect.