Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
fix date format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
foxmask committed Jun 24, 2015
1 parent e0a31e2 commit 34795f4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions django_th/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def to_datetime(data):
my_date_time = datetime.datetime.utcfromtimestamp(
time.mktime(data.updated_parsed))
elif 'my_date' in data:
my_date_time = arrow.get(str(data['my_date']),
'YYYY-MM-DD HH:mm:ss')
my_date_time = arrow.get(data['my_date'])

return my_date_time

Expand Down Expand Up @@ -177,10 +176,7 @@ def publish_data():

if published is not None:
# get the published date of the provider
published = arrow.get(
str(published),
'YYYY-MM-DD HH:mm:ss').to(
settings.TIME_ZONE)
published = arrow.get(published).to(settings.TIME_ZONE)
# store the date for the next loop
#  if published became 'None'
which_date = published
Expand Down

0 comments on commit 34795f4

Please sign in to comment.