Various timezone fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5503 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-12-14 07:33:47 +00:00
parent 1adf402593
commit 61881ef6ce
7 changed files with 34 additions and 26 deletions

View file

@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <Foundation/NSArray.h>
@ -48,7 +48,7 @@ main (int argc, char *argv[])
[dict setObject: name forKey: [detail timeZoneAbbreviation]];
e = [dict keyEnumerator];
while ((abbrev = [e nextObject]) != nil)
NSLog(@"%@\t%@\n", abbrev, name);
printf("%@\t%@\n", abbrev, name);
}
}

View file

@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <Foundation/NSArray.h>
@ -83,7 +83,7 @@ main (int argc, char *argv[])
{
e = [zones[i] objectEnumerator];
while ((name = [e nextObject]) != nil)
NSLog(@"%d %@\n", i, name);
printf("%d %@\n", i, name);
}
}

View file

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