TrueNAS 13.0-RC1 has been released

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
It's the "now" object, that is lacking a timezone, right?
Hard to say without a debugger, but some spelunking suggests that the snapshot tuple is carrying around a tzinfo object, in addition to the datetime - which feels weird to me, but I'm not reading the whole source, so it might make sense. No judgement here when it comes to time zones.

If we replace that with datetime.datetime.utcnow(), it will have a timezone of UTC?
utcnow() seems to return a naïve object, the canonical way to get UTC with the TZ info attached is with now( timezone.utc ).

And can then be compared to the other thingy? Does the subtraction work in that case?
In this case everything should work nicely once the tzinfo is consistently employed. Both parameters to the function are datetime.datetime objects, (well, one of them is a namedtuple which has a datetime element which is the object used here, but whatever) and as such overload the + and - operators according to a couple of rules which mostly make intuitive sense:

datetime2 = datetime1 + timedelta(1)
datetime2 = datetime1 - timedelta(2)
timedelta = datetime1 - datetime2(3)
datetime1 < datetime2Compares datetime to datetime. (4)

timedelta and datetime are both classes of the datetime module, which gets confusing at first if you don't read the docs carefully or have someone tell you that bit. So in this case we have:
datetime < datetime - timedelta <-> datetime < datetime
The latter of which is straightforward to most humans.


I work a lot with satellite data, so I have the benefit of being able to say "ok, everything is UTC internally, if there's ever a need for non-UTC, that's an I/O detail" (shamelessly copying the Apollo Guidance Computer's use of SI units for all calculations, with conversions from customary aerospace units done for I/O purposes for the crew's benefit).
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks. I had edited the post, already, because I got the info that they forgot to apply the fix to CORE and so I linked the pull request for anyone who needs it to apply manually. But I learned something. More python is always good in my current domain.

As for UTC internally: of course. Anything else just doesn't make any sense. Accept and deliver any local time, convert to UTC for all storage and computation. Considering that Unix has been doing precisely that for decades I'm always irritated by cron running in local time. BTW. ESXi plain refuses to deal with anything but UTC on the hypervisor host probably for all the same reasons.
 

NgM Dat

Dabbler
Joined
Mar 1, 2016
Messages
46
hi Guys,
In this time It still error when upgrade TrueNAS 12.x to 13.0 and then "Upgrade pool"
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
hi Guys,
In this time It still error when upgrade TrueNAS 12.x to 13.0 and then "Upgrade pool"
Its not recommended to upgrade the pool... do you have any reasons why you want to?
 

Volts

Patron
Joined
May 3, 2021
Messages
210
Do you ever get a little hangnail, and you pick at it, so it gets worse, but now it's taking up 100% of your focus, so you keep picking at it?

That's what the little ZFS pool upgrade notification is like. We're all just civilized raccoons.
 

NgM Dat

Dabbler
Joined
Mar 1, 2016
Messages
46
Its not recommended to upgrade the pool... do you have any reasons why you want to?
thanks for your response,
I have no reason to upgrade the pool, it's just the flow to upgrade TrueNAS 12.x to 13.0.
As following images, i thought that i got a recommendation to "Upgrade Pool".
 

Attachments

  • スクリーンショット 2022-05-15 173203.jpg
    スクリーンショット 2022-05-15 173203.jpg
    259.8 KB · Views: 240
  • スクリーンショット 2022-05-15 173217.jpg
    スクリーンショット 2022-05-15 173217.jpg
    155.2 KB · Views: 226
  • スクリーンショット 2022-05-15 173500.jpg
    スクリーンショット 2022-05-15 173500.jpg
    115.8 KB · Views: 231
  • スクリーンショット 2022-05-15 173710.jpg
    スクリーンショット 2022-05-15 173710.jpg
    145.1 KB · Views: 216
  • スクリーンショット 2022-05-15 173723.jpg
    スクリーンショット 2022-05-15 173723.jpg
    328.9 KB · Views: 218
Last edited:

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
thanks for your response,
I have no reason to upgrade the pool, it's just the flow to upgrade TrueNAS 12.x to 13.0.
As following images, i thought that i got a recommendation to "Upgrade Pool".
No, its a command option, not a recommendation.....
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
Its not recommended to upgrade the pool... do you have any reasons why you want to?
Seems like a good place to take advantage of Compatibility Property (new in zfs 2.1.0) then.
 
Top