Did Smartsheet change its Timestamp syntax for webhooks?
Recently my python script [which takes in a webhook and outputs some row updates] has broken with the following error:
[ pid=818344, time=2022-05-24 23:06:11,180 ]: /home/jw0nfo8iwcla/virtualenv/dj_app_01/3.7/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1421: RuntimeWarning: DateTimeField Webhook.timestamp received a naive datetime (2022-05-24 23:06:10) while time zone support is active. App 818344 output: RuntimeWarning)
I checked my webhooks to see how time was being formatted, and it very recently changed from
"timestamp": "2021-12-13T17:40:27.000+0000"
to
"timestamp": "2022-05-24T21:23:26.000+00:00"
This is a problem, because the time stamp is not being coded into my database correctly any more with the change in syntax/formatting.
Is this change an official update? Does anyone else know about it? Might the error mean something else? Not looking forward to working with the Python Time Module to fix this so open for feedback or translation into what's actually happening.
Answers
-
I use striptime(), which they talk about in this stack overflow
A bummer that the format changed without warning, unless I prompted it to change for my webbooks somehow...
-
final solution was to split at the +, remove last 5 characters (00:00) and replace with old syntax (0000) before saving the timestamp from the webhook as a variable in my script
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives