-
-
Save KyMidd/2dd2a6aaecf36ffcf0c23fdda4464ca8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get the created date of the user | |
| created_at_date=$(echo "$user_data" | jq -r '.created_at') | |
| echo "Created at date: $created_at_date" | |
| # Convert the created date to epoc | |
| # This uses branching logic because macs don't use GNUtils date | |
| if [ -z "$local_testing" ]; then | |
| created_date_in_epoc=$(date -d $created_at_date +"%s") | |
| else | |
| created_date_in_epoc=$(date -juf "%Y-%m-%dT%H:%M:%S" $created_at_date +%s 2>/dev/null) | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment