django-postmark
django-postmark copied to clipboard
rsplit on different timezone format
in models.py line 105 it's trying to do an rsplit on the "+" character but in my particular python + django install the timestamp has a different format.
This is the line:
timestamp, tz = resp["SubmittedAt"].rsplit("+", 1)
And this is the timestamp:
u'SubmittedAt': u'2011-09-23T07:39:47.9044908-04:00',
i.e. there is no + sign in that timestamp
i've commited a naive fix of this that at least solves my problem. not the prettiest solution i would imagine... https://github.com/Automatique/django-postmark/commit/ddc2658d80740031b31a3ffc9f044705af0d7b71
This is an issue also if server time is in UTC; I absolutely definitely want to keep my servers running in UTC.
I recently came across this issue as well. tijs's patch worked well for me.
@jcarbaugh good to hear, please keep in mind that it's not a very solid fix though. All that string mangling should probably be replaced with solid timezone aware code at some point.