[Plugin] System date and time

Post your completed addons to share with the community

Post » Wed Apr 01, 2015 3:42 pm

and one more small problem...
if user manipulates time on his sistem that affects my calculations... :(
is there a way to retrieve correct time/date from some world clock URL?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Apr 01, 2015 3:48 pm

@irina

This plugin only read timestamp at local machine.
"World clock" is another issue, it might need a service/server.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Tue Apr 07, 2015 4:26 pm

Does it work on mobile? CocoonJS for example?
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Tue Apr 07, 2015 4:50 pm

@xanxion

It works on cocoonJS and browser.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Tue Apr 07, 2015 10:18 pm

Lovely! thanks Rex!
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Apr 15, 2015 5:20 am

Update

Add time away L plugin which get elapsed interval of turned off game from local storage.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Wed Apr 15, 2015 12:07 pm

Does this work with cordova (crosswalk and phonegap) too?
B
17
S
5
Posts: 47
Reputation: 1,109

Post » Wed Apr 15, 2015 10:48 pm

@rexrainbow what i should do to create condition if time elapsed is more than 3600 (one hour)
on start of layout do something ?
B
107
S
25
G
43
Posts: 1,882
Reputation: 33,501

Post » Wed Apr 15, 2015 11:03 pm

Hey @delgado old friend, still having troubles with "System date" plugin? :)

First you need to save current time somewhere in your events. Webstorage was usually very good at it.

In your event's (when you want to save time) make event - > "Webstorage: Set local key "OldTime" to Data.UnixTimestamp
Then on start of the layout you need to compare that to check if one hour have passed.
on start of layout -> 3600 < Date.UnixTimestamp - int(WebStorage.LocalValue("OldTime")) - > do your events

It basically says "if 3600 is less then (current time - saved time) then one hour have passed".
ImageImageImageImage
B
156
S
64
G
41
Posts: 2,589
Reputation: 34,603

Post » Wed Apr 15, 2015 11:59 pm

@vybr

rex_Date plugin and rex_time_away (stored in webstorage) plugin does.
But rex_time_awayL (stored in localstorage) had not been tested yet.
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest