Feras wrote:
> Odd, you are right it appears my Time isnt correct...
> 
> I have the following code:
>       Time time = new Time();
>       Log.v("1", "time="+time);
> the time that's being printed (via the default time.toString()) is
> giving a date in the year 1970. The date on the android phone says the
> current date and year....
> Does anyone have any idea why this is so?

Whoops, and I screwed up -- I was thinking Date instead of Time, and
Time is an Android-ism, not a Harmony class.

According to the docs, new Time() does:

"Construct a Time object in the default timezone. The time is
initialized to Jan 1, 1970. "

So, it is behaving as documented.

You will need to use other static methods or set() or something to fill
in the date.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 1.0 Available!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to