Basic Command Line Date/Timestanp Examples
Epoch Seconds
date +%s
Timezone
date +%z
Timezone without newline
printf "%s" $(date +%z)
Timestamp Variable
#!/bin/bash
TIMESTAMP=$(date +%Y-%m-%dT%H:%M:%S)
echo $TIMESTAMP
date +%s
date +%z
printf "%s" $(date +%z)
#!/bin/bash
TIMESTAMP=$(date +%Y-%m-%dT%H:%M:%S)
echo $TIMESTAMP