mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	CSV Catalogs: Output all custom datetime columns in the local timezone to match the format for builtin columns
This commit is contained in:
		
							parent
							
								
									e828f7d41d
								
							
						
					
					
						commit
						713153a965
					
				@ -14,6 +14,7 @@ from calibre.customize.conversion import DummyReporter
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class CSV_XML(CatalogPlugin):
 | 
			
		||||
 | 
			
		||||
    'CSV/XML catalog generator'
 | 
			
		||||
 | 
			
		||||
    Option = namedtuple('Option', 'option, default, dest, action, help')
 | 
			
		||||
@ -135,7 +136,7 @@ class CSV_XML(CatalogPlugin):
 | 
			
		||||
                    elif field == 'isbn':
 | 
			
		||||
                        # Could be 9, 10 or 13 digits, with hyphens, possibly ending in 'X'
 | 
			
		||||
                        item = u'%s' % re.sub(r'[^\dX-]', '', item)
 | 
			
		||||
                    elif field in ['pubdate', 'timestamp']:
 | 
			
		||||
                    elif fm.get(field, {}).get('datatype') == 'datetime':
 | 
			
		||||
                        item = isoformat(item, as_utc=False)
 | 
			
		||||
                    elif field == 'comments':
 | 
			
		||||
                        item = item.replace(u'\r\n', u' ')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user