mistifyio / go-zfs

Go wrappers for ZFS commands
Apache License 2.0
128 stars 66 forks source link

split after \t instead of any spaces #68

Closed timaebi closed 2 years ago

timaebi commented 6 years ago

Without this dates like (Wed Feb 21 12:51 2018) in the creation property are split into multiple fields

DSpeichert commented 2 years ago

When using -p switch, the date is a single integer:

# zfs get creation rpool   
NAME   PROPERTY  VALUE                  SOURCE
rpool  creation  Tue Feb  2  7:00 2021  -

# zfs get -p creation rpool 
NAME   PROPERTY  VALUE                  SOURCE
rpool  creation  1612245609             -
mmlb commented 2 years ago

When using -p switch, the date is a single integer:

# zfs get creation rpool   
NAME   PROPERTY  VALUE                  SOURCE
rpool  creation  Tue Feb  2  7:00 2021  -

# zfs get -p creation rpool 
NAME   PROPERTY  VALUE                  SOURCE
rpool  creation  1612245609             -

You are very correct, this is the best course I think but would be a breaking change and would thus warrant a bump to v4. I'd like to get all the other non-breaking PRs merged before merging #85 which makes use of -p