IGN:News downloads now have dates set. Also use local timezone for default timestamp when converting

This commit is contained in:
Kovid Goyal 2009-08-20 11:33:39 -06:00
parent d54b49ce78
commit fb552eba06
2 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,7 @@ def meta_info_to_oeb_metadata(mi, m, log):
m.clear('publication_type')
m.add('publication_type', mi.publication_type)
if not m.timestamp:
m.add('timestamp', datetime.utcnow().isoformat())
m.add('timestamp', datetime.now().isoformat())
class MergeMetadata(object):

View File

@ -11,6 +11,7 @@ import os, time, traceback, re, urlparse, sys
from collections import defaultdict
from functools import partial
from contextlib import nested, closing
from datetime import datetime
from PyQt4.Qt import QApplication, QFile, QIODevice
@ -872,6 +873,8 @@ class BasicNewsRecipe(Recipe):
mi.publisher = __appname__
mi.author_sort = __appname__
mi.publication_type = 'periodical:'+self.publication_type
mi.timestamp = datetime.now()
mi.pubdate = datetime.now()
opf_path = os.path.join(dir, 'index.opf')
ncx_path = os.path.join(dir, 'index.ncx')
opf = OPFCreator(dir, mi)