1997-10-18 19:49:50 +00:00
|
|
|
/* Test time zone code. */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2003-03-23 07:06:27 +00:00
|
|
|
#include <Foundation/NSAutoreleasePool.h>
|
1997-10-18 19:49:50 +00:00
|
|
|
#include <Foundation/NSArray.h>
|
|
|
|
#include <Foundation/NSDate.h>
|
|
|
|
#include <Foundation/NSDictionary.h>
|
2002-09-30 16:54:29 +00:00
|
|
|
#include <Foundation/NSTimeZone.h>
|
1997-10-18 19:49:50 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
main ()
|
|
|
|
{
|
2004-10-11 03:08:54 +00:00
|
|
|
NSTimeZone *system;
|
2003-03-23 07:06:27 +00:00
|
|
|
CREATE_AUTORELEASE_POOL(pool);
|
1997-10-18 19:49:50 +00:00
|
|
|
|
2004-10-11 03:08:54 +00:00
|
|
|
GSPrintf(stdout, @"System time zone\n");
|
|
|
|
system = [NSTimeZone systemTimeZone];
|
|
|
|
GSPrintf(stdout, @" %@\n\n", [system description]);
|
|
|
|
|
|
|
|
GSPrintf(stdout, @"Local time zone:\n %@\n\n",
|
|
|
|
[[NSTimeZone localTimeZone] description]);
|
|
|
|
|
|
|
|
GSPrintf(stdout, @"Time zones for PST:\n %@\n",
|
|
|
|
[[[NSTimeZone abbreviationMap] objectForKey: @"PST"] description]);
|
|
|
|
|
|
|
|
|
2003-03-23 07:06:27 +00:00
|
|
|
RELEASE(pool);
|
1997-10-18 19:49:50 +00:00
|
|
|
return 0;
|
|
|
|
}
|