On Mar 31, 2009, at 9:20 AM, David Avendasora wrote: Okay I know this must be easy, but I just can't seem to get it to work.
I just want to display the time a particular page was displayed.
My component has this:
CurrentTimestamp : WOString { value = currentTimestamp; dateformat ="%m/%d/%y %H:%M"; }
When currentTimestamp returns a new NSTimestamp I get GMT, which is what I expected.
But when I return an NSTimestamp create like so:
GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(new NSTimestamp()); NSTimestamp timestamp = new NSTimestamp(calendar.getTimeInMillis(), TimeZone.getTimeZone("America/Chicago")); return timestamp;
I still get GMT.
What fundamental thing am I missing or doing wrong?
Dave
There are more ways to do things wrong, and it is harder to describe them, than the ways there are of doing it right. :-)
That being said, there should be a way to do this that is not deprecated, as NSTimestampFormatter is. O well. It works.
I have updated the TickTockMan application in Wonder to include a page from each time zone that includes such as the NSTimeZone object, the java.util.TimeZone object and a representation of the current time in the selected time zone.
My idea was that this app could be used to describe time stuff, to demonstrate code for it and to answer questions. But I have not been sitting around bored and have not done much with it.
If anyone has questions or suggestions, or if it makes something less clear rather than more clear, please give a holler.
cheers - ray
|