-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve timezone when converting Time and DateTime to OFX.
Some OFX servers are particular about the formatting of the timezone in `<DTSTART>` elements, and they reject the `[0:GMT]` timezone produced by ofxtools. Preserve the timezone of the `datetime` objects used when generating the OFX timestamps to avoid this problem. Always format the UTX offset with a leading `+` or `-`, even though the OFX spec permits the `+` to be dropped. Move the timestamp formatting into a `format_datetime()` which is shared by the `DateTime` and `Time` classes. This also ensures that millisecond rounding is handled correctly for both.
- Loading branch information
Showing
2 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters