return Date

5 posts

Flag Post

Is there a way to request a standardized date/time from the Kongregate server?

 
Flag Post

From the Kongregate server? I don’t believe so. You should have everything you need just by using the ActionScript Date class though.

 
Flag Post

The AS Date class is nice and all… but I need some way to determine a standardized date for all users. The Date class derives the time from the computer the swf file is running on, so if I manually set my computer’s clock to 1:00p.m and you set yours to 3:00p.m. we will both get unique times, even if we are playing at the same time.
The only solution I can think of is to request a Date object from the Kong server, which will give the same date to every user.

 
Flag Post

Yeah, but generally thats fine, unless you are concerned about some sort of cheating regarding date accuracy. You can probably use UTC time in the Date object if you are just looking for something consistent.

If you have a web host, you can easily upload a php script that will return the date and tie into that with your game. Otherwise, I don’t believe Kongregate has any API calls that send back the date (could be wrong). If I see anything like that, I’ll post it.

 
Flag Post

Thanks,
If you find anything it would be unbelievably helpful. UTC time will make things easier… but cheating is my main concern.