I like timestamps, especially with regards to picture files. So of course my first explorations would include learning about how Go works with time. And I like it so far! I'm still learning the basics, so I can only extrapolate from here, but it seems like a good sign that Go has easy methods for some of the tasks that I'm always trying to automate.
When designing format to display or process a timestamp, the key requirement is to make sure to include all the elements of the reference time. The package documentation for time wasn't too clear for me at first, and maybe one of the predefined layouts could be dissected for illustration. For example:
Since MST is GMT-0700, the reference time can be thought of as
01/02 03:04:05PM '06 -0700
Arbitrary, but sequential data was provided, just to fill out a time example: 1, 2, 3, 4, 5, 6, 7.
RFC3339 = "2006-01-02T15:04:05Z07:00"
In this example the reference elements are in a different order: 6, 1, 2, 3 (military), 4, 5, 7.
I finally got it, and yeah sure in hindsight all the explanation was already provided right there.
So my custom timestamp, which I want to be as condensed as possible, would look like:
MyTimeFormat = "20060102150405-0700"
Order of reference elements: 6, 1, 2, 3, 4, 5, 7
I'm still debating how to handle the pesky time zone info. My experiments have confirmed that everything is internally stored as Universal Coordinated Time (UTC), and that hints at a strategy I can consider.