1 person found this helpful
You should be able to use the getTime() method of the Date class which returns the number of milliseconds since midnight January 1, 1970. Get the getTime() value for the 0 hour of the current day, then subtract that from the current getTime() value and divide by 1000 to convert it to seconds.
You should be able to just use the current time of the day with new Date()
Just take the (current hours +1) * 3600 and you get the number of seconds so far including the all the seconds for the current hour
Then subtract the seconds in the minutes remaining in the hour
Then add the seconds into the current minute...
This should do:
var curDateTime:Date = new Date();
var totalSeconds:int = (curDateTime.hours + 1) * 3600;
var secondsRemainingInHour:int = (60 - curDateTime.minutes) * 60;
return totalSeconds - secondsRemainingInHour + curDateTime.seconds;