[IMP]: Timezone fix
bzr revid: atp@tinyerp.com-20110502065522-d1wld5qzaiw1v4d9
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<field name="opportunity" />
|
||||
<field name= "meeting" />
|
||||
<field name= "task" />
|
||||
<field name= "task" string="Meeting Tasks"/>
|
||||
<field name= "call" />
|
||||
<field name= "claim" />
|
||||
<field name= "account" />
|
||||
|
||||
@@ -49,7 +49,7 @@ def sugarcrm_fields_mapp(dict_sugar, openerp_dict, context=None):
|
||||
updated_dt = date.fromtimestamp(time.mktime(time.strptime(dict_sugar.get(val), '%Y-%m-%d')))
|
||||
else:
|
||||
convert_date = datetime.strptime(dict_sugar.get(val), '%Y-%m-%d %H:%M:%S')
|
||||
edate = convert_date.replace(tzinfo=dateutil.tz.gettz('UTC'))
|
||||
edate = convert_date.replace(tzinfo=au_tz)
|
||||
au_dt = au_tz.normalize(edate.astimezone(au_tz))
|
||||
updated_dt = datetime(*au_dt.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S')
|
||||
data_lst.append(updated_dt)
|
||||
|
||||
Reference in New Issue
Block a user