cubicweb/dataimport/stores.py
changeset 11308 df75fe529ba8
parent 11307 74f5814ecdf0
child 11309 31bf3254be69
equal deleted inserted replaced
11307:74f5814ecdf0 11308:df75fe529ba8
    60 import warnings
    60 import warnings
    61 from datetime import datetime
    61 from datetime import datetime
    62 from copy import copy
    62 from copy import copy
    63 
    63 
    64 from six import text_type
    64 from six import text_type
       
    65 
       
    66 import pytz
    65 
    67 
    66 from logilab.common.deprecation import deprecated
    68 from logilab.common.deprecation import deprecated
    67 from logilab.common.decorators import cached
    69 from logilab.common.decorators import cached
    68 
    70 
    69 from cubicweb.schema import META_RTYPES, VIRTUAL_RTYPES
    71 from cubicweb.schema import META_RTYPES, VIRTUAL_RTYPES
   260             baseurl += '/'
   262             baseurl += '/'
   261         self.baseurl = baseurl
   263         self.baseurl = baseurl
   262         if source is None:
   264         if source is None:
   263             source = cnx.repo.system_source
   265             source = cnx.repo.system_source
   264         self.source = source
   266         self.source = source
   265         self._now = datetime.utcnow()
   267         self._now = datetime.now(pytz.utc)
   266         # attributes/relations shared by all entities of the same type
   268         # attributes/relations shared by all entities of the same type
   267         self.etype_attrs = []
   269         self.etype_attrs = []
   268         self.etype_rels = []
   270         self.etype_rels = []
   269         # attributes/relations specific to each entity
   271         # attributes/relations specific to each entity
   270         self.entity_attrs = ['cwuri']
   272         self.entity_attrs = ['cwuri']