News for hackers. Stuff that matters.
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by llimllib on Thursday November 15, 2007 @01:06AM (#80021)
passing the time worked for me
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @01:18AM (#80028)
WTF?

 function solvePuzzle() {
     var t = new Date()
 
    var time = t.getTime();
    
    var params ="";
    params += 'pos=solvepuzzle';
    params += "&";
    params += 'auth=' + time.toString();

   
	new Ajax.Request('/weebly/publicBackend.php', {parameters:params,  onSuccess:handlerSolvePuzzle, onFailure:function() { alert('Transmition error. Please try again.'); }});

  }

 solvePuzzle();
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by altay on Thursday November 15, 2007 @01:27AM (#80033)
getTime() gives you milliseconds. you want seconds.
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @01:34AM (#80038)
Danke sehr...

But still not enough.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by altay on Thursday November 15, 2007 @02:29AM (#80067)
ummm... well, how might one convert milliseconds to seconds? here are a few ideas:

- write a screenscraper to get the answer from here: http://www.google.com/search?hl=en&q=1000+milliseconds+t...

- or perhaps hook your function up to the search API to get the answer that way (not sure if you can access the calculator through the API, though)

- or maybe just divide by 1000.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by tlrobinson on Thursday November 15, 2007 @02:18AM (#80059)
Why so verbose? Am I the only one who likes concise code?

'pos=solvepuzzle&auth='+(new Date()).getTime()

edit: yes, that's milliseconds

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @02:20AM (#80063)
Did it work?

I broke down so that I could change the string more easily.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by brett on Thursday November 15, 2007 @01:25AM (#80032)
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @01:34AM (#80037)
Isn't that what I am doing by using getTime() ?
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by ed on Thursday November 15, 2007 @03:23AM (#80094)
You need seconds. Also make sure your system clock is accurate and that you're in Weebly's time zone.
Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @12:35PM (#80261)
I got back to it now. Still not working...

 - Divided by 1000. 
 - Changed the clock to Pacific time
 - rounded using either parseInt, Math.round and Mouth.ceil

All failed.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by veritas on Thursday November 15, 2007 @12:42PM (#80266)
Dude... you're trying too hard on a trivial area.

You only have to be close by 60 seconds give or take, so just hard code in the timestamp: http://www.unixtimestamp.com/

It's a pain in the ass to change every minute, but it works and you'll get on with the rest of it.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by rglullis on Thursday November 15, 2007 @01:50PM (#80307)
Nope. Still not working.

I changed the timezone in my computer, calculated time differences. Everything. What is getting on me is precisely the fact that this is supposed to be so trivial.

Re:Creative Hiring: Solve the puzzle in this jobs page and g... by drusenko on Thursday November 15, 2007 @05:17PM (#80391)
I think unix time is set in UTC, not PST. that might help.