• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Displaying Local Time on a Web Client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Displaying Local Time on a Web Client


  • Subject: Displaying Local Time on a Web Client
  • From: David Avendasora <email@hidden>
  • Date: Tue, 31 Mar 2009 12:20:40 -0400

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Displaying Local Time on a Web Client
      • From: Ray Kiddy <email@hidden>
    • Re: Displaying Local Time on a Web Client
      • From: Mark Ritchie <email@hidden>
    • Re: Displaying Local Time on a Web Client
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Getters without the "get" part
  • Next by Date: Re: Displaying Local Time on a Web Client
  • Previous by thread: Re: Getters without the "get" part
  • Next by thread: Re: Displaying Local Time on a Web Client
  • Index(es):
    • Date
    • Thread