I've tried numerous methods to get this working but I have no luck so far. I'm wondering if it has anything to do with the fact I am in the UK and python is looking at my local time.
for instance I want to convert 2013-04-01 to 1364770800000.
any help will be much appreciated.
local = pytz.timezone("UTC")
from_date = datetime.datetime.strptime(root.findall("xml stuff")[0].text, "%Y-%m-%d")
local_dt_from = local.localize(from_date, is_dst=None)
utc_dt_from = local_dt_from.astimezone(pytz.utc).date()
This is what I have used to change my timezone for my date calcuation