Skip to content

Commit

Permalink
OM-229 Fixed datatime string
Browse files Browse the repository at this point in the history
  • Loading branch information
malinowskikam committed Jul 22, 2024
1 parent fea6131 commit dbe3350
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion msystems/soap/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class SoapDatetime(datetime.datetime):
def isoformat(self):
return re.sub(r"[+-]00:?00$", "Z", self.strftime("%y-%m-%dT%H:%M:%S%z"))
return re.sub(r"[+-]00:?00$", "Z", self.strftime("%Y-%m-%dT%H:%M:%S%z"))

@classmethod
def from_ad_date(cls, value):
Expand Down
1 change: 1 addition & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Utility scripts for msystems integration
12 changes: 12 additions & 0 deletions scripts/json_escape_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
import json

if len(sys.argv) != 2:
print("Missing argument\nUsage: python3 json_escape_file.py <PATH>", file=sys.stderr)
exit(1)

try:
with open(sys.argv[1]) as f:
print(json.dumps(f.read()))
except Exception as e:
print(f"Error while reading file: {e}", file=sys.stderr)

0 comments on commit dbe3350

Please sign in to comment.