Minor fixes in datetime

- You can directly parse time using strptime
- Going back 30 days will give wrong result if the current month is March. Since you just need the previous month, going back a single day is more than enough.
Merge pull request #1 from Sanrag/datetime_fix

Minor fixes in datetime