I want to parse the SVN record date:
svn list --xml https:
If I am not mistaken, it is provided using the ISO 8601 standard . Example:
dateString = "2012-02-14T11:22:34.593750Z"
I am using Python 2.7 and I am looking for a better way to handle using only standard modules. I think I will parse it this way using the regular expression: ^--- is a matching group, and A means that I will assume that they always exist (which could be a weakness)
dateString = "2012-02-14T11:22:34.593750Z" ^--- ^- ^-A^- ^- ^--------A | | | I think it always gives the date | as UTC, which Z means in ISO 8601. | Just a separator
After parsing it, I just create a datetime from it.
Is there a better way to use Python 2.7 with standard modules only?
source share