Message Boards Message Boards

Back

RE: Using the clock instead of just a timer

Toggle
Using the clock instead of just a timer
Answer
12/10/20 1:03 PM
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 Votes)

RE: Using the clock instead of just a timer
procedure date-time
Answer
12/10/20 5:30 PM as a reply to 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 Votes)

RE: Using the clock instead of just a timer
Answer
12/10/20 6:58 PM as a reply to 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 Votes)

RE: Using the clock instead of just a timer
Answer
12/10/20 7:35 PM as a reply to 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". 

Attachments:

Attachment

0 (0 Votes)

RE: Using the clock instead of just a timer
Answer
12/10/20 7:46 PM as a reply to Rob Penn.
Ahhh! Got it.  
Thanks!  
0 (0 Votes)

RE: Using the clock instead of just a timer
Answer
12/19/20 6:52 AM as a reply to 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 Votes)

RE: Using the clock instead of just a timer
Answer
12/21/20 9:04 PM as a reply to 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 Votes)

RE: Using the clock instead of just a timer
Answer
1/1/21 10:43 AM as a reply to Navdeep Dhillon.
That's awesome. Thanks again, guys. You really rock
0 (0 Votes)