forked from tanner/qotnews
fix tvnz time for nzst/nzdt
This commit is contained in:
parent
8bb2d174bf
commit
085dd47d13
|
@ -1,10 +1,16 @@
|
|||
import pytz
|
||||
from datetime import timedelta
|
||||
import dateutil.parser
|
||||
|
||||
|
||||
TZINFOS = {
|
||||
'NZDT': pytz.timezone('Pacific/Auckland'),
|
||||
'NZST': pytz.timezone('Pacific/Auckland')
|
||||
'NZST': pytz.timezone('Pacific/Auckland'),
|
||||
}
|
||||
|
||||
TZINFOS = {
|
||||
'NZDT': 13*60*60,
|
||||
'NZST': 12*60*60,
|
||||
}
|
||||
|
||||
def unix(date_str, tz=None, tzinfos=TZINFOS):
|
||||
|
@ -15,4 +21,4 @@ def unix(date_str, tz=None, tzinfos=TZINFOS):
|
|||
return int(dt.timestamp())
|
||||
except:
|
||||
pass
|
||||
return 0
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user