A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/protocolbuffers/protobuf/commit/01b154c85317e1ddaf0da7a125fc3d5c34f85d7b below:

Update GetCurrentTime to use datetime.datetime.now · protocolbuffers/protobuf@01b154c · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+1

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+1

-1

lines changed Original file line number Diff line number Diff line change

@@ -181,7 +181,7 @@ def FromJsonString(self, value):

181 181 182 182

def GetCurrentTime(self):

183 183

"""Get the current UTC into Timestamp."""

184 -

self.FromDatetime(datetime.datetime.utcnow())

184 +

self.FromDatetime(datetime.datetime.now(tz=datetime.timezone.utc))

185 185 186 186

def ToNanoseconds(self):

187 187

"""Converts Timestamp to nanoseconds since epoch."""

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4