Show current time: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
Multiple approached to show current time
Multiple approached to show current time


== Linux BASH ==
* {{kbd | key= date}} ({{Linux}}) output the system date: Thu Oct 25 15:05:10 CST 2012 <ref>[http://linux.vbird.org/linux_server/0440ntp.php 鳥哥的 Linux 私房菜 -- NTP 時間伺服器]</ref><ref>[https://en.wikipedia.org/wiki/DATE_(command) DATE (command) - Wikipedia, the free encyclopedia]</ref>
* {{kbd | key= date}} ({{Linux}}) output the system date: Thu Oct 25 15:05:10 CST 2012 <ref>[http://linux.vbird.org/linux_server/0440ntp.php 鳥哥的 Linux 私房菜 -- NTP 時間伺服器]</ref><ref>[https://en.wikipedia.org/wiki/DATE_(command) DATE (command) - Wikipedia, the free encyclopedia]</ref>
* {{kbd | key= TZ=Asia/Taipei date}} ({{Linux}}) output the time from the Taipei/CST timezone <ref>[http://unix.stackexchange.com/questions/48101/how-can-i-have-date-output-the-time-from-a-different-timezone How can I have `date` output the time from a different timezone? - Unix & Linux Stack Exchange]</ref>
* {{kbd | key= TZ=Asia/Taipei date}} ({{Linux}}) output the time from the Taipei/CST timezone <ref>[http://unix.stackexchange.com/questions/48101/how-can-i-have-date-output-the-time-from-a-different-timezone How can I have `date` output the time from a different timezone? - Unix & Linux Stack Exchange]</ref>
== Windows DOS ==
* {{kbd | key= date/t}} ({{Win}}) (parameter: /t will not ask you to change the current date)
* {{kbd | key= date/t}} ({{Win}}) (parameter: /t will not ask you to change the current date)
<pre>output:
<pre>output:
Line 14: Line 17:
OS in Mandarin Chinese (Windows 10): 2017/02/03 週五 15:35:31.61
OS in Mandarin Chinese (Windows 10): 2017/02/03 週五 15:35:31.61
</pre>
</pre>
== PHP & MySQL ==
[[PHP and MySQL syntax]]
* related pages: [[Time server]], [[PHP_and_MySQL_syntax#timestamp | timestamp in PHP and MySQL syntax]]
* related pages: [[Time server]], [[PHP_and_MySQL_syntax#timestamp | timestamp in PHP and MySQL syntax]]


[[Category:Programming]] [[Category:Linux]] [[Category:Windows]]
[[Category:Programming]] [[Category:Linux]] [[Category:Windows]]

Navigation menu