We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ ! ] Game Clock II (easier issues).
Topic Started: Jun 22 2013, 06:17 PM (225 Views)
VUSA
Member
[ * ]
Last question for a very long time. Thank you so much. :)

Board Address: http://w11.zetaboards.com/Virtual_America/index/
Board Software: Zetaboards
Description: (What you want your code to do): We found a good code. Here's a new problem. The code, because it's javascript, only runs time client side. We want to figure out how to create a universal time for it, so it runs on only one time. And two, the ajax is somehow making it impossible to post in the shoutbox. is there a way around that? (I think it's the ajax).

Code:
 
<script type = 'text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>

<script>

$(document).ready(function() {

var baseGame = new Date(2014,07,10).getTime();
var baseReal = new Date(2013,05,22).getTime();
var currentrealTime = Date.now();

$("#calendar").html(new Date(baseGame + 10.5*(currentrealTime - baseReal)));

});

</script>

For reference this may help, but I don't know how to integrate it:

http://praveenlobo.com/techblog/how-to-convert-javascript-local-date-to-utc-and-utc-to-local-date/
Edited by VUSA, Jun 22 2013, 06:31 PM.
Offline Profile Goto Top
 
Roby
Member Avatar
#27

This request has gone a lengthy period of time without any new activity, therefore it is being marked as expired. This means that the request was typically too time-consuming or irritating for coders (who provide this service voluntarily in their free time) to complete.

Thank you.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic