[android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Larry/MavrickProductions
Thank you both for the replies! Actually, the strings are not the problem. The human date/time to millisecond conversions are wrong. 12/25/2011 should equal 1324789200. My converted time (from the screen output) 12/25/2011 is -877432832. And when the drill-down is done it shows that Christmas is

Re: [android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Kostya Vasilyev
17.10.2011 1:26, Larry/MavrickProductions ?: Thank you both for the replies! Actually, the strings are not the problem. The human date/time to millisecond conversions are wrong. 12/25/2011 should equal 1324789200. In seconds, yes. In milliseconds, no, it's 1324789200 * 1000 which does

[android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Larry/MavrickProductions
Found part of the problem: My time set line: TimerSet.set(12, 25, 2011); // set the date to Dec 25, 2011, 12AM was backwards - it should have been (25, 12, 2011). Once fixed, the numbers are a lot closer, but still off by 36 days. Still looking for help on where I've made a stupid math/code

[android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Studio LFP
Simple, they caught us all looking. Check out the API docs: http://developer.android.com/reference/android/text/format/Time.html#set%28int,%20int,%20int%29 And notice this part: *month the zero-based month number (in the range [0,11])* Took me a second to find this, but December is 11, not 12

Re: [android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Nikolay Elenkov
On Mon, Oct 17, 2011 at 11:54 AM, Studio LFP studio@gmail.com wrote: month the zero-based month number (in the range [0,11]) Took me a second to find this, but December is 11, not 12 like we think about it. Tricky Android dev team! That comes from java.util.Calendar/Date which have

[android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!

2011-10-16 Thread Larry/MavrickProductions
WOW!! I read that well over a dozen times and didn't catch that until you both pointed it out. Now it works just fine. THANK YOU!!! Really appreciate the assist! Best, -Larry On Oct 16, 11:09 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Mon, Oct 17, 2011 at 11:54 AM, Studio LFP