On UNIX and UNIX-Like systems:
Type 'date' at a prompt.
$ date
Tue Jan 8 11:17:06 EST 2002
In Perl:
#!/usr/bin/perl
use POSIX 'strftime';
$date = strftime("%c",localtime);
print $date;
exit;
In PHP:
<?php $tdate = date("F j, Y"); print $tdate; ?>
In Windows:
Hold your mouse cursor over the time displayed in the system tray within
the taskbar. A tooltip will pop up with today's date.
In DOS:
Type 'date' at a prompt. Hit ENTER twice.
C:\> date
Current date is Tue 01-02-2002
Enter new date (mm-dd-yy):
C:\>
In MacOS:
Click on the clock inside the menu bar.
In Java:
new Date();
or
System.currentTimeMillis();
Thanks to Xamot for the Java code, and mkb for the MacOS method.