Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

runtime=$(date +\%Y\%m\%d\%H\%M\%S)

# Time Zones
# Some z and z specifiers show the current active time zone
echo $(date '+%z'   ) # +0200
echo $(date '+%:z'  ) # +02:00
echo $(date '+%::z' ) # +02:00:00
echo $(date '+%:::z') # +02         (Print required precision only)
echo $(date '+%Z'   ) # CEST        (Alphabetic timezone abbreviation)
Source by renenyffenegger.ch #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+8 =