Keskustelualueet Keskustelualueet

Takaisin

RE: Using the clock instead of just a timer

Vaihda
Using the clock instead of just a timer
Vastaus
10.12.2020 13:03
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 Ääniä)

RE: Using the clock instead of just a timer
procedure date-time
Vastaus
10.12.2020 17:30 vastaus kirjoittajalle 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 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
10.12.2020 18:58 vastaus kirjoittajalle 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 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
10.12.2020 19:35 vastaus kirjoittajalle 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 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
10.12.2020 19:46 vastaus kirjoittajalle Rob Penn.
Ahhh! Got it.  
Thanks!  
0 (0 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
19.12.2020 6:52 vastaus kirjoittajalle 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 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
21.12.2020 21:04 vastaus kirjoittajalle 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 Ääniä)

RE: Using the clock instead of just a timer
Vastaus
1.1.2021 10:43 vastaus kirjoittajalle Navdeep Dhillon.
That's awesome. Thanks again, guys. You really rock
0 (0 Ääniä)