[Plugin] System date and time

Post your completed addons to share with the community

Post » Fri Apr 07, 2017 6:26 pm

Rex, You must be busy, just on the forums alone.

How is Daylight Savings Time handled?
Does it give/take away an hour from a timer or does it work around it.
How would I work around DST if I needed to?

I'm referring to Time Away L.
B
59
S
33
G
13
Posts: 223
Reputation: 12,105

Post » Sat Apr 08, 2017 4:08 am

@Unconnected

time away L only uses seconds to get elapsed time, it does not consider Daylight Savings Time.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Tue Apr 11, 2017 11:15 am

I meant an hour worth of seconds. :P

Sorry, I'm a tad bit confused.
It isn't considered as in 3600 seconds will be lost/gained, or it isn't considered because the seconds counted isn't effected?

In a time based game an hour could make a huge difference.

Daylight savings time follows rules.
begins at 2:00 a.m. on the second Sunday of March and
ends at 2:00 a.m. on the first Sunday of November

It shouldn't be hard for me to implement that if needed.
I just don't want to break stuff in my game.

I appreciate the time.
Thanks again.
B
59
S
33
G
13
Posts: 223
Reputation: 12,105

Post » Tue Apr 11, 2017 12:08 pm

@Unconnected

It gets elapsed time (in seconds) by unix timestamp.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Mon May 22, 2017 10:12 am

Hi! Will there be an updated version of this and the other time addons for Construct 3? Its almost the only plugin I use for my apps and games. :)
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Tue May 23, 2017 4:43 am

@Bl4ckSh33p

rex_date plugin of C3.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Wed May 24, 2017 9:08 am

Thank you very much! :D
How can I install it in C3? Drag and drop did not work and I could not find anything in settings.
/edit: found the addon manager in the menu. I renamed the .zip to .c3addon and it seems to work now. :)


PS: the link to momentjs is 404 not found
It is recommended using rex_momentjs to get formatted date string

https://rexrainbow.github.io/C3RexDoc/p ... entjs.html
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Thu May 25, 2017 1:29 am

@Bl4ckSh33p

I got "rex_date.c3addon" from that download link in firefox, I have no idea why you got zip download.
rex_momentjs is a C2 plugin which have not converted to C3 plugin yet.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Thu May 25, 2017 9:01 am

true, the link is c3addon but Edge saves a .zip when I click on the download link. seems it recognizes that its a zip file and adds the "proper" extension? :)
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Thu May 25, 2017 2:25 pm

Hi,

I am about to start sending out prototype builds of a game I have developed to schools for testing and feedback and what not.

What I am looking to do is make a timed demo, in the sense that after they launch the prototype for the first time it will log the date and time and then be able to reference that against the current system time to be able to tell time passage and therefore stop the demo after 30 days for example.

I have your time-related plugins but not sure how to use them (i understand getting the two unix timestamps but what how do i actually calculate time passage.)

All help appreciated,
Thanks.
B
5
S
1
Posts: 65
Reputation: 507

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest