summaryrefslogtreecommitdiff
path: root/data/gdata-objectivec-client/formatter.diff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-05-08 19:08:33 +0000
committerJay Freeman <saurik@saurik.com>2008-05-08 19:08:33 +0000
commit9a888b9a4d236fab2d48a83c6eff8b49d8e0eee5 (patch)
treeed1027b3fe453de1c8fb9cf29c057995825b8cf3 /data/gdata-objectivec-client/formatter.diff
parent94b9b8c1811b2191ada7c71ff1db5028280e3631 (diff)
Added GData client APIs.
git-svn-id: http://svn.telesphoreo.org/trunk@268 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/gdata-objectivec-client/formatter.diff')
-rw-r--r--data/gdata-objectivec-client/formatter.diff22
1 files changed, 22 insertions, 0 deletions
diff --git a/data/gdata-objectivec-client/formatter.diff b/data/gdata-objectivec-client/formatter.diff
new file mode 100644
index 000000000..09076c950
--- /dev/null
+++ b/data/gdata-objectivec-client/formatter.diff
@@ -0,0 +1,22 @@
+diff -ru gdata-objectivec-client-129/Source/Networking/GDataHTTPFetcherLogging.m gdata-objectivec-client-129+iPhone/Source/Networking/GDataHTTPFetcherLogging.m
+--- gdata-objectivec-client-129/Source/Networking/GDataHTTPFetcherLogging.m 2008-05-06 00:11:33.000000000 +0000
++++ gdata-objectivec-client-129+iPhone/Source/Networking/GDataHTTPFetcherLogging.m 2008-05-07 17:32:26.000000000 +0000
+@@ -160,11 +160,13 @@
+ if (!gLoggingDateStamp) {
+ // produce a string like 08-21_01-41-23PM
+
+- NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
+- [formatter setFormatterBehavior:NSDateFormatterBehavior10_4];
+- [formatter setDateFormat:@"M-dd_hh-mm-ssa"];
+-
+- gLoggingDateStamp = [[formatter stringFromDate:[NSDate date]] retain] ;
++ CFLocaleRef locale = CFLocaleCopyCurrent();
++ CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
++ CFRelease(locale);
++
++ CFDateFormatterSetFormat(formatter, CFSTR("M-dd_hh-mm-ssa"));
++ gLoggingDateStamp = (NSString *) CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) [NSDate date]);
++ CFRelease(formatter);
+ }
+ return gLoggingDateStamp;
+ }