[android-developers] Re: Time/CountDownTimer: Wrong millis returned for date/time - HELP PLEASE!!
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 like we think about it.
Tricky Android dev team!
Steven
Studio LFP
http://www.studio-lfp.com
On Sunday, October 16, 2011 4:38:17 PM UTC-5, Larry/MavrickProductions wrote:
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 error.
Appreciate the replies!
Best, -Larry
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home