• 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
Getting the GMT time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the GMT time


  • Subject: Getting the GMT time
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Fri, 16 Apr 2004 13:11:16 -0700

Greetings:

Is there a simple way to get the GMT time?

The only viable way I know is to get the time offset from the local
time zone and compute it.

But is there a direct way to actually get the GMT?

The following snippet I've tried but I get a nil result:

NSTimeZone *t = [[NSTimeZone alloc] init];

if ([t initWithName:@"GMT"] == nil) {
NSLog(@"***** NULL Time zone???");
}

NSCalendarDate *GMTtime = [NSCalendarDate calendarDate];
[GMTtime setTimeZone:t];



I'm lost here.

Regards,

Ric.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • RE: Getting the GMT time
      • From: "Jonathan E. Jackel" <email@hidden>
    • Re: Getting the GMT time
      • From: Brian Bergstrand <email@hidden>
  • Prev by Date: Re: Getting PDF and/or EPS data
  • Next by Date: Re: bindings and undo
  • Previous by thread: Re: Best place to hide license files
  • Next by thread: Re: Getting the GMT time
  • Index(es):
    • Date
    • Thread