[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
37
S
16
G
3
Posts: 858
Reputation: 6,744

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.
Goodbye
B
114
S
31
G
295
Posts: 4,549
Reputation: 164,608

Post » Tue Apr 07, 2015 4:26 pm

Does it work on mobile? CocoonJS for example?
B
38
S
10
G
9
Posts: 542
Reputation: 9,181

Post » Tue Apr 07, 2015 4:50 pm

@xanxion

It works on cocoonJS and browser.
Goodbye
B
114
S
31
G
295
Posts: 4,549
Reputation: 164,608

Post » Tue Apr 07, 2015 10:18 pm

Lovely! thanks Rex!
B
38
S
10
G
9
Posts: 542
Reputation: 9,181

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.
Goodbye
B
114
S
31
G
295
Posts: 4,549
Reputation: 164,608

Post » Wed Apr 15, 2015 12:07 pm

Does this work with cordova (crosswalk and phonegap) too?
B
19
S
5
Posts: 48
Reputation: 1,161

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
119
S
32
G
53
Posts: 1,896
Reputation: 39,569

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
160
S
69
G
44
Posts: 2,611
Reputation: 36,844

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.
Goodbye
B
114
S
31
G
295
Posts: 4,549
Reputation: 164,608

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest