掲示板 掲示板

戻る

Using the clock instead of just a timer

トグル
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 投票)

RE: Using the clock instead of just a timer
procedure date-time
答え
20/12/10 17:30 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 投票)

RE: Using the clock instead of just a timer
答え
20/12/10 18:58 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 投票)

RE: Using the clock instead of just a timer
答え
20/12/10 19:35 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 投票)

RE: Using the clock instead of just a timer
答え
20/12/10 19:46 Rob Pennへのコメント
Ahhh! Got it.  
Thanks!  
0 (0 投票)

RE: Using the clock instead of just a timer
答え
20/12/19 6:52 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 投票)

RE: Using the clock instead of just a timer
答え
20/12/21 21:04 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 投票)

RE: Using the clock instead of just a timer
答え
21/01/01 10:43 Navdeep Dhillonへのコメント
That's awesome. Thanks again, guys. You really rock
0 (0 投票)