
Use server calendar & clock to display time & date in VT
| <?php echo( php code ); ?> | display | comment |
|---|---|---|
| date('Y-m-d h:i:s'); | 2012-02-07 09:06:59 | server now timedate in 12 hr format |
| date("l") | Tuesday | dow of server now |
| date("l", mktime(0,0,0,10,2,1951)) | Tuesday | request dow of 10/2/1951 |
| echo(date(DATE_RFC822) | Tue, 07 Feb 12 09:06:59 -0800 | server now with GMT shift |
| date(DATE_ATOM,mktime(17,36,21,10,3,1975)) | 1975-10-03T00:00:00-07:00 | specified timedate with GMT shift |
| "It is ".gmdate("l")." in Greenwich now" | It is Tuesday in Greenwich now | GMT dow now with concatenation |
| date("D j\-M\-Y h:i:s A e") | Tue 7-Feb-2012 09:06:59 AM America/Los_Angeles | server now dow timedate am/pm timezone |
| gmdate("D j\-M\-Y h:i:s A e") | Tue 7-Feb-2012 05:06:59 PM UTC | GMT now dow timedate am/pm timezone |
| date_default_timezone_set("America/New_York") | 1 | Outputs 1 always and uses New York time |
| date("D j\-M\-Y h:i:s A e") | Tue 7-Feb-2012 12:06:59 PM America/New_York | server now converted to New York Time |
| strftime("It is %a on %b %d, %Y, %X time zone: %Z",time()) | It is Tue on Feb 07, 2012, 12:06:59 time zone: EST | server now converted, new format |
| strftime("Vermont, USA %e-%b-%Y %a %I:%M %p %Z",time()) | Vermont, USA 7-Feb-2012 Tue 12:06 PM EST |
server now converted, another format |
Web site by StevenGrindle.com
Free Internet Browsers
This web site is designed to be compliant with standards developed by the World Wide Web Consortium (W3C)