Discuss Scratch
- TM_
-
1000+ posts
Server-Time-block
At the moment you can use the current block to display or use time. But it uses always the computer's time. So if you make a -board-online game (like Travian or OGame) for example, where you have to wait some time after you start something to build, you are able to cheat, because you can just change the time on your computer. Using a server-time (the time of the timezone/UTC, where the server stands) instead of current time prevents cheating. Another example is also an online project. People are in a world with a day-night-cycle. And the night has special events. People who live in USA for example would see this events, but if someone from europe plays with him he wouldn't see it, because he has day time and not night time. A server-time would help solving this problem. So all in all it helps to synchronize the projects and uses a global instead of a local clock.
explainaton of server-time/server-clock:
The time of the place on eartch, where the server stands. Or a presetted timezone/UTC. If the server is in britian for example, it will be in the timezone UTC +0. So all users will get with these reporters the time of UTC+0, no matter were they really live.
Why Cloud Vars can't solve the problem:
So Cloud-Data solves the problem with the cheaters and also the problem with the global time, but only if the time would really run always. For example, a farming game: You can plant carots and earn them after 10 minutes. If there is really always some one online the cloud var would changed by 1 for every second and can be used as a time block. But if there was no one else online you visit the projectafter 10 minutes again and it still shows “The carrots are ready in 10 minutes”. So we need the Server-time Block for running time also if no one is watching the project.
This block can also be used in many other situations.
Questions? Suggestions? Let me know!
Do you support?
EDIT:
@savaka suggested this block:
- current time zone picks up automaticly the timezone of your location
- UTC -11
- UTC -10
- UTC -9
- UTC -8
- UTC -7
- UTC -6
- UTC -5
– UTC -4
- UTC -3
- UTC -2
- UTC -1
- UTC 0
- UTC 1
- UTC 2
- UTC 3
- UTC 4
- UTC 5
- UTC 6
- UTC 7
- UTC 8
- UTC 9
- UTC 10
- UTC 11
- UTC 12 UTC -11 to UTC 12 sets thesame time zone for any user. Not sure they are really needed
- MIT-Server-time This returns the timezone where the MIT-Server stands. It is global and does never use the local time of the computer. So it also needs like cloud-data an internet-connection. The UTC options above may use local computers time, so they never would solve the main problem descibed in this post. The “MIT-Server-timezone” will solve it, because it's global and independet from local time.
explainaton of server-time/server-clock:
The time of the place on eartch, where the server stands. Or a presetted timezone/UTC. If the server is in britian for example, it will be in the timezone UTC +0. So all users will get with these reporters the time of UTC+0, no matter were they really live.
Why Cloud Vars can't solve the problem:
So Cloud-Data solves the problem with the cheaters and also the problem with the global time, but only if the time would really run always. For example, a farming game: You can plant carots and earn them after 10 minutes. If there is really always some one online the cloud var would changed by 1 for every second and can be used as a time block. But if there was no one else online you visit the projectafter 10 minutes again and it still shows “The carrots are ready in 10 minutes”. So we need the Server-time Block for running time also if no one is watching the project.
This block can also be used in many other situations.
Questions? Suggestions? Let me know!

Do you support?
EDIT:
@savaka suggested this block:
([unit v] in time zone [time zone v] :: sensing)This block wont make big changes. I think every computersaves next to the local time it's timezone. So the second drop-down-menu needs these options:
- current time zone picks up automaticly the timezone of your location
- UTC -11
- UTC -10
- UTC -9
- UTC -8
- UTC -7
- UTC -6
- UTC -5
– UTC -4
- UTC -3
- UTC -2
- UTC -1
- UTC 0
- UTC 1
- UTC 2
- UTC 3
- UTC 4
- UTC 5
- UTC 6
- UTC 7
- UTC 8
- UTC 9
- UTC 10
- UTC 11
- UTC 12 UTC -11 to UTC 12 sets thesame time zone for any user. Not sure they are really needed
- MIT-Server-time This returns the timezone where the MIT-Server stands. It is global and does never use the local time of the computer. So it also needs like cloud-data an internet-connection. The UTC options above may use local computers time, so they never would solve the main problem descibed in this post. The “MIT-Server-timezone” will solve it, because it's global and independet from local time.
SUPPORTERS (20)
TM_
P110
dracae
xlk
mathfreak231
Centrifugal
jontmy00
Lirex
Lilifant7253
Sandro318
Tohmis
1234abcdcba4321
Blaze349
Blueinkproductions
savaka
stickfiregames
Braeden5454
TheHockeyist
ImagineIt
Mega_AL
Last edited by TM_ (July 22, 2014 19:42:46)
- mathfreak231
-
1000+ posts
Server-Time-block
Oh…I don't know… With me, 4 supporters, can we get more?
highlight text below
SUPPORT
- TM_
-
1000+ posts
Server-Time-block
Oh…I don't know… With me, 4 supporters, can we get more?
highlight text below
SUPPORT


- TM_
-
1000+ posts
Server-Time-block
The (days since 2000) block is global.
No it isn't. I tested it right now. I made a forever set var on day since 2000. It showed something with 5000. Then i changed in the computer settings the time from november 2013to november 2012. Then the var showed something less than 5000, so it changed when i changed the local time —> not global.
Also it's hard to work with it, because it's hard to get exact hours and minutes, so even if it would be global unexperienced scratcher would get problems
- drmcw
-
1000+ posts
Server-Time-block
Which server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
- TM_
-
1000+ posts
Server-Time-block
Which server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
Yes but who will update the cloud var? I want to have a block which has always the value of the global time for example of UTC +0, so the brittian time. And it will be always the real brittian time, even if you live somewhere else like in australia. Cloud vars can't fix that problem, because they will not update when nobody is online, so you can't make change cloud var by 1 for each second. Also you can't set the time if nobody of the online people lives in UTC+0. Also you can't detect the timezone of the user.
Do you understand me now?
- jontmy00
-
500+ posts
Server-Time-block
Why not just simply Scratch Time (was it GMT +5 or -5?)?Which server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
Yes but who will update the cloud var? I want to have a block which has always the value of the global time for example of UTC +0, so the brittian time. And it will be always the real brittian time, even if you live somewhere else like in australia. Cloud vars can't fix that problem, because they will not update when nobody is online, so you can't make change cloud var by 1 for each second. Also you can't set the time if nobody of the online people lives in UTC+0. Also you can't detect the timezone of the user.
Do you understand me now?

- drmcw
-
1000+ posts
Server-Time-block
You mean GMT. If it was from the Scratch servers it would more likely be MIT timeWhich server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
Yes but who will update the cloud var? I want to have a block which has always the value of the global time for example of UTC +0, so the brittian time. And it will be always the real brittian time, even if you live somewhere else like in australia. Cloud vars can't fix that problem, because they will not update when nobody is online, so you can't make change cloud var by 1 for each second. Also you can't set the time if nobody of the online people lives in UTC+0. Also you can't detect the timezone of the user.
Do you understand me now?

I know what you mean but why do you need the time when the program is not being run? Whenever anyone starts to play then start incrementing the time in a cloud variable so anyone else connecting will then share the time?
Let's suppose it was implemented and you had MIT time as a block. You write an amazing program that produces a stunning sunset image just as the sun sets at MIT. For another Scratcher it may be 2am, do you think they want to wait until then to see your program produce its sunset?
- TM_
-
1000+ posts
Server-Time-block
You mean GMT. If it was from the Scratch servers it would more likely be MIT timeWhich server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
Yes but who will update the cloud var? I want to have a block which has always the value of the global time for example of UTC +0, so the brittian time. And it will be always the real brittian time, even if you live somewhere else like in australia. Cloud vars can't fix that problem, because they will not update when nobody is online, so you can't make change cloud var by 1 for each second. Also you can't set the time if nobody of the online people lives in UTC+0. Also you can't detect the timezone of the user.
Do you understand me now?
I know what you mean but why do you need the time when the program is not being run? Whenever anyone starts to play then start incrementing the time in a cloud variable so anyone else connecting will then share the time?
Let's suppose it was implemented and you had MIT time as a block. You write an amazing program that produces a stunning sunset image just as the sun sets at MIT. For another Scratcher it may be 2am, do you think they want to wait until then to see your program produce its sunset?
I have many uses for it. The event synchronization you talk about is also a planned feature for some projects, but then i wouldn't make an event which appears only once a day. Then i would split a real life day into many ingame days, if the project/game uses day and night-cycles. The event-synchronization can be used for much more than just a sunset and so on. It has many advantages. Also the anti-cheat feature for gameplay based on timeblocks.
Things like a sunset would really be better for the local time. But things which are effected by the time, would create unfair situations. For example in a multiplayer game: At night people become werewolves and are faster than humans. People with night time in their timezone have than an advantages. Also it could break planned rules, because then not everyplayer is a werewolve.
Other example: A game has a special feature which is only unlocked on every 1st day of a month. People could cheat and set their local computer clock on a 1st day of the month.
There are really many usages
- drmcw
-
1000+ posts
Server-Time-block
Still can't see why you need to run time when no one is playing the game. It can all be done with cloud variables surely?You mean GMT. If it was from the Scratch servers it would more likely be MIT timeWhich server's time? Don't see the point. If you want a global time in your project that is shared use a cloud variable.
Yes but who will update the cloud var? I want to have a block which has always the value of the global time for example of UTC +0, so the brittian time. And it will be always the real brittian time, even if you live somewhere else like in australia. Cloud vars can't fix that problem, because they will not update when nobody is online, so you can't make change cloud var by 1 for each second. Also you can't set the time if nobody of the online people lives in UTC+0. Also you can't detect the timezone of the user.
Do you understand me now?
I know what you mean but why do you need the time when the program is not being run? Whenever anyone starts to play then start incrementing the time in a cloud variable so anyone else connecting will then share the time?
Let's suppose it was implemented and you had MIT time as a block. You write an amazing program that produces a stunning sunset image just as the sun sets at MIT. For another Scratcher it may be 2am, do you think they want to wait until then to see your program produce its sunset?
I have many uses for it. The event synchronization you talk about is also a planned feature for some projects, but then i wouldn't make an event which appears only once a day. Then i would split a real life day into many ingame days, if the project/game uses day and night-cycles. The event-synchronization can be used for much more than just a sunset and so on. It has many advantages. Also the anti-cheat feature for gameplay based on timeblocks.
Things like a sunset would really be better for the local time. But things which are effected by the time, would create unfair situations. For example in a multiplayer game: At night people become werewolves and are faster than humans. People with night time in their timezone have than an advantages. Also it could break planned rules, because then not everyplayer is a werewolve.
Other example: A game has a special feature which is only unlocked on every 1st day of a month. People could cheat and set their local computer clock on a 1st day of the month.
There are really many usages
- TM_
-
1000+ posts
Server-Time-block
It hasn't to run time when no one is online it has to jump to the original time, to make for example an ingame day 6 hours long. Then every reallife day has 4 ingame days. Other example: You make a farming game. You can plant carrots and can earn them after 10 minutes. But when it runs by a cloud var you can open the project after 10 hours and it needs nevertheless almost 10 minutes, because the time didn't run. So i hope you see my problem, it has to overbridge (hope you understand this word, i'm from germany) times were no one is online to set events and so on to exact times for everyone together without being affected by 0-Users-Online-Time. Do you understand me now? Still can't see why you need to run time when no one is playing the game. It can all be done with cloud variables surely?