Foren Foren

Zurück

Using the clock instead of just a timer

Umschalten
Is there a possibility of linking a lesson to the actual time / clock rather than just the timer? I'd like to have to have the lesson or a trigger start at a pre-determined time and correspondingly, end at a certain time based on real world time.
0 (0 Stimmen)

RE: Using the clock instead of just a timer
procedure date-time
Antwort
10.12.20 17:30 als Antwort auf Rupert Picardo.
Hi Rupert,

Yes, this is possible to do using one of SmartBuilder's Advanced > Procedure blocks. Here's how: https://www.screencast.com/t/7Ss3Fl0e

Rob
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
10.12.20 18:58 als Antwort auf Rob Penn.
This is pretty cool, Rob.  I just tried it out but am not able to get it to work, though.  
Do I have it set up correctly?  
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
10.12.20 19:35 als Antwort auf Scott Sheridan.
Hi Scott,

The format you're using for the registered function is "MM/DD/YYY:hh:mm:ss" but you then compare that to "13:52 on 10-12-2020" which is "hh:mm on mm-dd-yyy" format, so this comparison will never be true. To make it work, change the first parameter in the registered function to "hh:mm on mm-dd-yyyy". 
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
10.12.20 19:46 als Antwort auf Rob Penn.
Ahhh! Got it.  
Thanks!  
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
19.12.20 06:52 als Antwort auf Rob Penn.
As a follow up to this question - is there a way of linking the time to say GMT or any international standard time?
Rather than a system time, I’d like to actually have say a lesson that is only active from say, 5:00pm GMT till 6:00pm GMT - irrespective of where you are in the world.

Any inputs on how I can achieve that?
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
21.12.20 21:04 als Antwort auf Rupert Picardo.
Hi Rupert,
This is possible. You can use Javascript to get the UTC time. However, keep in mind that this is still using the operating system's clock - which means if the learner adjusts their computer's clock, they can get around it. To make it really work so that a learner could not access the course, you would have to have a server somewhere (something that the learner cannot change) that the lesson could talk to to confirm the actual time.

If you're interested in using Javascript to get the UTC time, here's how to do that:
Video: https://share.smartbuilder.com/public/support/get-UTC-time-make-course-available.mp4
Sample lesson: https://share.smartbuilder.com/public/support/get-UTC-time-make-course-available.sb4

Hope that helps!
0 (0 Stimmen)

RE: Using the clock instead of just a timer
Antwort
01.01.21 10:43 als Antwort auf Navdeep Dhillon.
That's awesome. Thanks again, guys. You really rock
0 (0 Stimmen)