Getting the GMT time
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.