<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -118,9 +118,7 @@ NSString * const kDataFileURL   = @&quot;http://www.departments.bucknell.edu/geograph
     if (lastUpdate) lastDate = [lastUpdate copy];
     [lastUpdate release]; lastUpdate = nil;
     
-    feedData = [[NSString alloc] initWithContentsOfURL:dataFileURL
-                                              encoding:NSWindowsCP1251StringEncoding
-                                                 error:NULL];
+    feedData = [[NSString alloc] initWithContentsOfURL:dataFileURL encoding:NSWindowsCP1251StringEncoding error:NULL];
     
     // Note: -[NSString initWithContentsOfUrl: encoding: error:] should return nil if the
     // network location cannot be reached, and set an error object, but in my experience, it
@@ -141,16 +139,11 @@ NSString * const kDataFileURL   = @&quot;http://www.departments.bucknell.edu/geograph
         if (lastUpdate == nil || (lastUpdate != nil &amp;&amp; ![lastUpdate isEqualToDate:lastDate])) {
             *hasNewData = YES;
             [dataCache setObject:(lastUpdate != nil ? lastUpdate : (NSObject *) [NSNull null]) forKey:kMDKeyDate];
-            [dataCache setObject:[NSNumber numberWithInt:[[dataComp objectAtIndex:IDX_PRESSURE] intValue]]
-                          forKey:kMDKeyPressure];
-            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_TEMP] floatValue]]
-                          forKey:kMDKeyTemp];
-            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_HUMIDITY] floatValue]]
-                          forKey:kMDKeyHumidity];
-            [dataCache setObject:[NSNumber numberWithInt:[[dataComp objectAtIndex:IDX_RAINFALL] intValue]]
-                          forKey:kMDKeyRainfall];
-            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_SUN] floatValue]]
-                          forKey:kMDKeySun];
+            [dataCache setObject:[NSNumber numberWithInt:[[dataComp objectAtIndex:IDX_PRESSURE] intValue]] forKey:kMDKeyPressure];
+            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_TEMP] floatValue]] forKey:kMDKeyTemp];
+            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_HUMIDITY] floatValue]] forKey:kMDKeyHumidity];
+            [dataCache setObject:[NSNumber numberWithInt:[[dataComp objectAtIndex:IDX_RAINFALL] intValue]] forKey:kMDKeyRainfall];
+            [dataCache setObject:[NSNumber numberWithFloat:[[dataComp objectAtIndex:IDX_SUN] floatValue]] forKey:kMDKeySun];
         } else {
             *hasNewData = NO;
         }</diff>
      <filename>Source/BBDataParser.m</filename>
    </modified>
    <modified>
      <diff>@@ -45,43 +45,14 @@
 
 - (id)initWithYear:(NSString *)year month:(NSString *)month day:(NSString *)day hour:(NSString *)hour
 {
-    BOOL makeYesterday = NO;
-    NSMutableString *dateStr = [[[NSMutableString alloc] initWithFormat:@&quot;%@-&quot;, year] autorelease];
-    [dateStr appendFormat:@&quot;%@-%@ &quot;, month, day];
-    
-    // Apparently the data stream isn't adjusted for Daylight Savings Time, so
-    // if it IS Daylight Saving Time, we have to adjust the string manually,
-    // as well as set the time zone.
-    if ([[NSTimeZone timeZoneWithName:@&quot;US/Eastern&quot;] isDaylightSavingTime]) {
-        // But at 11PM EDT (12AM EDT), we have to change the hour to be
-        // 11, and the day to be the day BEFORE -- otherwise we get a
-        // situation in which the hour is set to -1. That's bad.
-        int hourVal = [hour intValue];
-        if (hourVal == 0) {
-            NSLog(@&quot;Hour val is %d, adjusting to 24&quot;, hourVal);
-            hourVal = 24 * 100;     // Because we subtract 1 from it, below
-            makeYesterday = YES;    // We'll fix this below
-        }
-        
-        [dateStr appendFormat:@&quot;%d:00:00 &quot;, (hourVal / 100) - 1];
-        [dateStr appendString:@&quot;-0400&quot;];
-    } else {
-        [dateStr appendFormat:@&quot;%d:00:00 &quot;, [hour intValue] / 100];
-        [dateStr appendString:@&quot;-0500&quot;];
-    }
+    NSString *tz = [[NSTimeZone timeZoneWithName:@&quot;US/Eastern&quot;] isDaylightSavingTime] ? @&quot;-0400&quot; : @&quot;-0500&quot;;
+    NSMutableString *dateStr = [[[NSMutableString alloc] initWithFormat:@&quot;%@-%@-%@ %d:00:00 %@&quot;, year, month, day, ([hour intValue] / 100), tz] autorelease];
     
     NSLog(@&quot;Making date with str: %@&quot;, dateStr);
     // I think I'm supposed to release the allocated 'self' here in order to
     // return the NEW date object...right?
     [self release];
     self = [[NSDate alloc] initWithString:dateStr];
-    // If we had to adjust the date for DST (above) and it was midnight,
-    // it's actually 11 PM on the PREVIOUS day, so handle that here.
-    if (makeYesterday) {
-        // Pretty sure I should autorelease here, too, but I'm not sure
-        [self autorelease];
-        self = [self addTimeInterval:-(24.0 * 60.0 * 60.0)];
-    }
     return self;
 }
 </diff>
      <filename>Source/NSDateAdditions.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dbeedb49a66c6fc059aba15973d4314964a8fe38</id>
    </parent>
  </parents>
  <author>
    <name>Michael Dippery</name>
    <email>mdippery@gmail.com</email>
  </author>
  <url>http://github.com/mdippery/bucknellbug/commit/73441914fd141e2c5a909863b759bf911047afad</url>
  <id>73441914fd141e2c5a909863b759bf911047afad</id>
  <committed-date>2009-10-07T06:50:55-07:00</committed-date>
  <authored-date>2009-10-07T06:50:55-07:00</authored-date>
  <message>Fixed the date processing...again.

I think the feed now sends the hour correctly; we just have to adjust
for the proper time zone.</message>
  <tree>bf7177d7e028083abfae38213e7c614a03ec0d66</tree>
  <committer>
    <name>Michael Dippery</name>
    <email>mdippery@gmail.com</email>
  </committer>
</commit>
