feast icon indicating copy to clipboard operation
feast copied to clipboard

fix: Using one single function call for utcnow().

Open shuchu opened this issue 1 year ago • 1 comments

Which issue(s) this PR fixes:

The datetime.utcnow() is about to be deprecated in Python3.12. This pr use one single function to wrap the datetime.utcnow() for easy update and fix.

Please be aware this PR does not retire the datetime.utcnow().

Fixes #4240

shuchu avatar Jun 22 '24 20:06 shuchu

Do we really need this? a one-liner util looks odd. Might as well change to the newer version directly.

tokoko avatar Jun 27 '24 06:06 tokoko

Do we really need this? a one-liner util looks odd. Might as well change to the newer version directly.

I was thinking about to provide a single function as an implementation of the utcnow(). It's easy to maintenance in case if someone create a new PR but using their own favor implementation of utcnow().

The next step is to have a small PR to deprecate the current datetime.utcnow(). But I need to be very careful since some place in our code base will transfer the value of datetime.utcnow() to a string first and change it to a new string value. The is a inexplicitly "assumption" about the length and format of the str(datetime.utcnow()).

shuchu avatar Jul 02 '24 03:07 shuchu