Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Add timestamp_epoch field #1423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions twint/tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def Tweet(tw, config):
# parsing date to user-friendly format
_dt = tw['created_at']
_dt = datetime.strptime(_dt, '%a %b %d %H:%M:%S %z %Y')
t.timestamp_epoch = datetime.timestamp(_dt)
_dt = utc_to_local(_dt)
t.datetime = str(_dt.strftime(Tweet_formats['datetime']))
# date is of the format year,
Expand Down