Date and Computer Language Shell Script

2

Is there a shell script function that takes the date and time (time zone) and language that are configured on the computer?

    
asked by anonymous 08.12.2015 / 18:30

1 answer

1

This should be trivial, in fact:

#!/bin/sh

# script /tmp/tes.sh

language=$LANG                    # Idioma
date=$(date +"%d-%m-%Y %H:%M:%S") # Data e hora local
timezone_offset=$(date +%z)       # Fuso horário
    
10.12.2015 / 22:47