Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi @MM_9023322
Since Thingworx is configured in the UTC timezone, you can convert PST to UTC and set the scheduler CRON string accordingly. For example: When PST is 00:00, UTC will be 07:00. So you can set the scheduler to trigger at 07:00 UTC for the facility in Sacramento.
Create a new scheduler for each facility and update the CRON string based on the facility timezone
If scheduler configurations are updated from Mashup / Runtime, you can get the client browser timezone difference and convert it to UTC to update scheduler configurations.
/VR
Hi @MM_9023322
If you want to get the Thingworx server timezone you can get using the below method.
To get the client browser timezone
timevalue = new Date();
Output = timevalue.toString();
To get the client browser timezone difference, you can use "getTimezoneOffset()" in the expression function to get the timezone offset value
timevalue = new Date();
Output = timevalue.getTimezoneOffset();
/VR
Hi @Velkumar , no I don't want server time, I want to get the facility time. Say, if my input is CDT, PST, IST should give me time as per it!
Sure, I have a facility in Sacramento which is in PST. My server is in UTC. Now I want to trigger every day when the time is 00:00 in PST. My time is set to trigger every 30min, because like PST, I have facilities at CST, IST, UTC. So whenever the facilitytime is 00:00 service should run. My input should be CST/PST/.. and should give me facility time! How I can do it?
how about a separate treatment for time? I mean, creating a function to specialize in time.
Hi @MM_9023322
Since Thingworx is configured in the UTC timezone, you can convert PST to UTC and set the scheduler CRON string accordingly. For example: When PST is 00:00, UTC will be 07:00. So you can set the scheduler to trigger at 07:00 UTC for the facility in Sacramento.
Create a new scheduler for each facility and update the CRON string based on the facility timezone
If scheduler configurations are updated from Mashup / Runtime, you can get the client browser timezone difference and convert it to UTC to update scheduler configurations.
/VR