What would be the advantage over using a struct with just UNIX time?
Check out this new package! github.com/lane-c-wagner/go-tinytime
That's a good point - For the same memory (uint32) you could get second precision, but you give up being able to represent quite as many dates.
Edit: Also, using day, month, year supports from year 0 to year 65535. Unix time supports from 1970 to ~2100
Maybe I'll make a go-tinytime package that does what you suggest. It essentially gets second precision at the cost of fewer date options.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What would be the advantage over using a struct with just UNIX time?
Check out this new package! github.com/lane-c-wagner/go-tinytime
That's a good point - For the same memory (uint32) you could get second precision, but you give up being able to represent quite as many dates.
Edit: Also, using day, month, year supports from year 0 to year 65535. Unix time supports from 1970 to ~2100
Maybe I'll make a go-tinytime package that does what you suggest. It essentially gets second precision at the cost of fewer date options.