How can I display the current time & date setting?
Best example (IMHO) using
$ timedatectl Local time: Thu 2014-07-24 19:51:23 IST Universal time: Thu 2014-07-24 14:21:23 UTC Timezone: Asia/Kolkata (IST, +0530) NTP enabled: no NTP synchronized: no RTC in local TZ: no DST active: n/a
Visit the manpage for more settings and further information.
For the time zone, you can use geolocation:
$ curl https://ipapi.co/timezone America/Chicago
$ curl http://ip-api.com/line?fields=timezone America/Chicago
If you have PowerShell installed:
PS> Get-TimeZone Id : Europe/Vilnius DisplayName : (UTC+02:00) Eastern European Standard Time StandardName : Eastern European Standard Time DaylightName : Eastern European Summer Time BaseUtcOffset : 02:00:00 SupportsDaylightSavingTime : True
I suspect this won't be popular answer in a Linux community, but I really like the verb-noun convention. It makes it easier for me to remember commands, and it will also work on all distributions with PowerShell installed :)
Does PowerShell run on Linux? If so, at least add a reference on how to install it on Ubuntu. `sudo snap install powershell` is suggested, but references should be added as this is not a small commitment. Starting it results in (my emphasis): *"error: This revision of snap "powershell" was published using classic confinement and thus may **perform arbitrary system changes** outside of the security sandbox that snaps are usually confined to, which may **put your system at risk**. If you understand and want to proceed repeat the command including --classic."*