libs-base/Testing/nstimezone.m

22 lines
563 B
Mathematica
Raw Normal View History

/* Test time zone code. */
#include <stdio.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSAutoreleasePool.h>
int
main ()
{
id detail;
NSAutoreleasePool *arp = [NSAutoreleasePool new];
printf("time zones for PST:\n%@\n",
[[[NSTimeZone abbreviationMap] objectForKey: @"PST"] description]);
printf("time zones:\n%@\n", [[NSTimeZone timeZoneArray] description]);
printf("local time zone:\n%@\n", [[NSTimeZone localTimeZone] description]);
[arp release];
return 0;
}