Revision: 22308
          http://sourceforge.net/p/bibdesk/svn/22308
Author:   hofman
Date:     2018-06-14 09:34:19 +0000 (Thu, 14 Jun 2018)
Log Message:
-----------
Use standardDescription for date fields, as description varies between OS 
versions

Modified Paths:
--------------
    trunk/bibdesk/BibDocument.m
    trunk/bibdesk/BibItem.m

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2018-06-14 06:31:21 UTC (rev 22307)
+++ trunk/bibdesk/BibDocument.m 2018-06-14 09:34:19 UTC (rev 22308)
@@ -2018,7 +2018,7 @@
 - (void)markAsImported {
     [self setFileURL:nil];
     // set date-added for imports
-    NSString *importDate = [[NSDate date] description];
+    NSString *importDate = [[NSDate date] standardDescription];
     for (BibItem *pub in publications)
         [pub setField:BDSKDateAddedString toValue:importDate];
     [[self undoManager] removeAllActions];
@@ -2258,7 +2258,7 @@
     }
     
     // set Date-Added to the current date, since unarchived items will have 
their own (incorrect) date
-    NSString *importDate = [[NSDate date] description];
+    NSString *importDate = [[NSDate date] standardDescription];
     for (pub in newPubs)
         [pub setField:BDSKDateAddedString toValue:importDate];
        

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2018-06-14 06:31:21 UTC (rev 22307)
+++ trunk/bibdesk/BibItem.m     2018-06-14 09:34:19 UTC (rev 22308)
@@ -263,7 +263,7 @@
             files = [[NSMutableArray alloc] initWithCapacity:2];
         }
                if (isNew){
-                       NSString *nowStr = [[NSDate date] description];
+                       NSString *nowStr = [[NSDate date] standardDescription];
                        [pubFields setObject:nowStr forKey:BDSKDateAddedString];
                        [pubFields setObject:nowStr 
forKey:BDSKDateModifiedString];
         }
@@ -997,7 +997,7 @@
        [self setPubTypeString:newType];
        
        if (date != nil) {
-               [pubFields setObject:[date description] 
forKey:BDSKDateModifiedString];
+               [pubFields setObject:[date standardDescription] 
forKey:BDSKDateModifiedString];
        } else {
                [pubFields removeObjectForKey:BDSKDateModifiedString];
        }
@@ -1061,7 +1061,7 @@
        
     [self setCiteKeyString:newCiteKey];
        if (date != nil) {
-               [pubFields setObject:[date description] 
forKey:BDSKDateModifiedString];
+               [pubFields setObject:[date standardDescription] 
forKey:BDSKDateModifiedString];
        } else {
                [pubFields removeObjectForKey:BDSKDateModifiedString];
        }
@@ -1232,7 +1232,7 @@
     // to allow autocomplete:
     if (value)
                [[BDSKCompletionManager sharedManager] addString:value 
forCompletionEntry:key];
-    [pubFields setValue:[date description] forKey:BDSKDateModifiedString];
+    [pubFields setValue:[date standardDescription] 
forKey:BDSKDateModifiedString];
        [self updateMetadataForKey:key];
        
        NSMutableDictionary *notifInfo = [NSMutableDictionary 
dictionaryWithObjectsAndKeys:key, BDSKBibItemKeyKey, nil];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to