Comments (5)
Good to know. I had done some wrong thing internally in my code that generated the date so that is what caused the issue and not the code here
from atproto.
Noticed that this might be something I did wrong as I had used
datetime.datetime.now().isoformat()
instead of
datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%I:%SZ")
from atproto.
By the way, here's how I generate my timestamps, which perfectly matches the output of JS's Date.prototype.toISOString()
:
import datetime
datetime.datetime.now(tz=datetime.timezone.utc).replace(tzinfo=None).isoformat(timespec="milliseconds") + "Z"
Also by the way, datetime.utcnow()
is deprecated and will be removed in a future python version, see https://blog.miguelgrinberg.com/post/it-s-time-for-a-change-datetime-utcnow-is-now-deprecated
from atproto.
That is really useful to know thanks
from atproto.
@EllieTheYeen The AT Protocol SDK provides and uses this method internally. Doesn't it feet your needs?
from atproto import Client
client = Client()
print(client.get_current_time_iso())
from atproto.
Related Issues (20)
- Python Version Depency Issue HOT 2
- Would you recommend any specific gunicorn settings for a feed? HOT 1
- AtUri.from_str() returns invalid host for some AT uri's (Fix included) HOT 2
- Implement autogenerated Record Namespaces HOT 1
- Add the ability to submit posts that include labels
- Delete deprecated "subject" argument of .like() and .repost() methods
- Delete deprecated record models called "Main" instead of "Record"
- Auth token handling improvements HOT 10
- Delete deprecated SessionString class
- decode_dag_multi does not decode fully HOT 4
- Misspelling in get_author_feed HOT 3
- Subscribing to feed? HOT 4
- Parsing Alt Text HOT 2
- Add support for event stream HOT 8
- get_blob errors on redirects HOT 2
- High memory usage: from atproto import Client HOT 5
- Failing on authentication HOT 2
- IpldLink model validation fails HOT 8
- delete_post not work HOT 3
- 'py_type' | '$type' is not fully backward and forward compatible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atproto.