tianshanxuester / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

Bad string format in GDataDateTime #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi. I'm slowly trying to get GData to work with GNUstep.  Most of the
changes are in GNUstep, but I'd like to get a few inconsistencies changed
in GData. Here, GDataDateTime element uses a number format like %0l2d (but
only in one place, the other places are OK), which apparently NSString
accepts, but I cannot find any specification that allows this (GNU printf
and Mac OS X printf do not understand it).  Here is the change (based on
latest SVN checkout):

Index: Elements/GDataDateTime.m
===================================================================
--- Elements/GDataDateTime.m    (revision 511)
+++ Elements/GDataDateTime.m    (working copy)
@@ -198,7 +198,7 @@
       timeOffsetString = [NSString stringWithFormat:@"%@%02ld:%02ld",
         sign, (long)(offset/(60*60)) % 24, (long)(offset / 60) % 60];
     }
-    timeString = [NSString stringWithFormat:@"T%02ld:%02ld:%0l2d%@",
+    timeString = [NSString stringWithFormat:@"T%02ld:%02ld:%02ld%@",
       (long)[dateComponents hour], (long)[dateComponents minute],
       (long)[dateComponents second], timeOffsetString];
   }

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by adam.fe...@gmail.com on 23 Apr 2010 at 5:19

GoogleCodeExporter commented 9 years ago
Thanks for pointing this out.

Change: http://code.google.com/p/gdata-objectivec-client/source/detail?r=512

Original comment by gregrobbins on 23 Apr 2010 at 6:30