Hi - does anyone know how to output a human readable date & time during the build step? We want to pass the build date & time string to slack and other steps where we can keep a record of when the build was created, but the $BITRISE_BUILD_TRIGGER_TIMESTAMP only gives out unix timestamp. Any insight would be appreciated!
Do you need the time of the trigger? Or is the time of when the build starts to run enough?
If it is enough just drop in the Generate timestamps step which can generate a more human readable timestamp.
Hi, a little bit late to the game but do you know how we could further format the
$ISO_DATETIME variable that’s generated by the
Generate Timestamps step into something even more human readable?
P.S. a simple Script step can also be used with
envman to expose the env var (http://devcenter.bitrise.io/tips-and-tricks/expose-environment-variable/), e.g. something like:
#!/usr/bin/env bash # fail if any commands fails set -e # debug log set -x envman add --key=MY_TIMESTAMP --value="$(date +"%m-%d-%y")"
This will expose the
date output into the env var
MY_TIMESTAMP which can be used in subsequent steps.
date format options & examples: https://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/
Great, thanks for the help!
Any time @eroth!