Noam Yorav-Raphael wrote
> The solution is simple, and is what datetime64 used to do before the
> change
> - have a type that just represents a moment in time. It's not "in UTC" -
> it
> just stores the number of seconds that passed since an agreed moment in
> time (which is usually 1970-01-01
On Fri, Nov 6, 2020 at 5:58 PM Brock Mendel wrote:
> > I find the whole notion of a "timezone naive timestamp" to be nearly
> meaningless
>
> From the perspective of, say, the dateutil parser, what would you do with
> "2020-11-06 07:48"? If you assume it's UTC you'll be wrong in this case.
> If
> I find the whole notion of a "timezone naive timestamp" to be nearly
meaningless
>From the perspective of, say, the dateutil parser, what would you do with
"2020-11-06 07:48"? If you assume it's UTC you'll be wrong in this case.
If you assume it is in your local timezone, you'll be wrong in
Hi,
I actually arrived at this by first trying to use pandas.Timestamp and
getting very frustrated about it. With pandas, I get:
>>> pd.Timestamp.now()
Timestamp('2020-11-06 09:45:24.249851')
I find the whole notion of a "timezone naive timestamp" to be nearly
meaningless. A timestamp should
I can try to dig up the old discussions, but datetime64 used to implement
both (1) and (3), and this was updated in a very intentional way.
Datetime64 now works like Python's own time-zone naive datetime.datetime
objects. The documentation referencing "Z" should be updated -- datetime64
can be in
Without weighing in yet on how I feel about the deprecation, you can see
some discussion about why this was originally deprecated in the PR that
introduced the warning:
https://github.com/numpy/numpy/pull/6453
Eric
On Thu, Nov 5, 2020, 20:13 Noam Yorav-Raphael wrote:
> Hi,
>
> I suggest
Hi,
I suggest removing the deprecation warning when constructing a datetime64
with a timezone. For example, this is the current behavior:
>>> np.datetime64('2020-11-05 16:00+0200')
:1: DeprecationWarning: parsing timezone aware datetimes is
deprecated; this will raise an error in the future