Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to View Current EST Time in Linux

    How to View Current EST Time in Linux

    By RahulDecember 7, 20202 Mins Read

    This tutorial will help you to find time of different time zones on Linux command prompt or shell scripts. For example, your system is running with UTC timezone. When you execute “date” command on terminal, it will show you the current time of the timezone configured on your system. How do you find the time in other timezone without changing timezone of your system (eg: current EST time)

    Advertisement

    View Current EST Time

    1. Search on Google – Just open google.com and enter “current est time” in search bar. This will show you the current time in EST timezone.

      current est time Google

    2. View current est time on linux command line – You can also view the current time of any timezone, no matter what timezone is configured on your system. No need to change timezone of your system to view current time in other timezone like current est time.
      TZ="EST" date 
      
      Output> Sunday 06 December 2020 06:12:59 AM EST
      

      current est time in linux

      Similarly, you can search for current time in other timzones, like:

      TZ="UTC" date 				# Current time in UTC 
      TZ="GMT" date 				# Current time in GMT 
      TZ="PST" date 				# Current time in PDT (Pasific Time) 
      TZ="America/New_York" date 		# Current time in America/New_York 
      TZ="America/Virgin" date 		# Current time in America/Virgin 
      TZ="Europe/London" date 		# Current time in Europe/London 
      TZ="Europe/Paris" date 		# Current time in Europe/Paris 
      TZ="Australia/Sydney" date 		# Current time in Australia/Sydney 
      

      Use Current EST Time in Shell Scripts

      Getting time of different time zones is useful while writing scripts. For example, you need to check current time in some other timezone that current system.

      Just in case, your system is running in UTC timezone and your script required the current EST time. The below script will help you to find current EST time and store it in a variable. Which you can further use in your script.

      1
      2
      3
      4
      5
      6
      7
      #!/bin/bash
       
      # Store current EST time in a variable
      EST_TIME=$(TZ="EST" date)
       
      # Print value stored in variable
      echo "Current time - $EST_TIME"

      Conclusion

      Hope this tutorial helped you to find current time in different-2 time zones on Linux command line.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    20 Basic Linux Commands for the Beginners (Recommended)

    tail Command in Linux with Examples

    What is a Orphan Process in Unix/Linux

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • 20 Basic Linux Commands for the Beginners (Recommended)
    • tail Command in Linux with Examples
    • What is a Orphan Process in Unix/Linux
    • How To Display Warning Message to Unauthorized SSH Access
    • How to Set a Custom SSH Login Banner and MOTD
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.