- convert timestamps in Fuego to be RFC 3339-compliant
export BUILD_TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
This uses underscore as the delimiter between date and time (where ISO860-1 uses 'T'), and dashes between time elements (instead of colons).
ftc (version pre-1.2) currently uses:
timestamp = time.strftime("%Y-%m-^d_%H-%M-%S")
We should add an indicator of timezone.
Is this really needed? I think it's only needed if we need to order or compare build start times between sites. I'm not sure yet if this is needed.
We should definitely use colons in the time portion of the timestamp.
Here is the RCF3339 spec:
In order to use timestamps as part of file and directory names, and avoid problems with file and directory names containing spaces, Fuego chooses to use an underscore to replace the 'T' in the iso8601 specification, as the delimiter between the date and time portions of the timestamp.
Executing this in San Jose (UTC-7), gives:
However, this uses a space in between the date and time, instead of a 'T'.
the 'date' command on Ubuntu 14.04 supports the '%:z' option, which shows timezone information in [-+]hour:minute format. However, strftime and python's time.strftime() does not support the %:z option.
They only allow %z, which shows the timezone offset as a single 4-digit number: e.g. '-0700'
The posix page for strftime does not support the '%:z' options. http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
And strptime doesn't support either %:z or even %z, so apparently can't parse the timezone information at all. see 'man strptime'.
Various python lists have bug reports about the difficulty of parsing RFC3339-format timestamp strings, due to the issue of the colon in the timestamp.
Maybe I should use "%F_%T%z" as the format string instead?
Modify /etc/timezone with your timezone information.
Do a systemwide export of TZ, in /etc/profile