contactskn 2 Report post Posted June 15, 2009 Dear friends I want to display the current date and time on my website. How can I be able to do that. What is the code for the same. Can I display this date and time in any other language other than english like hindi etc. in unicode or any other language. Please do help me with codes.Thanks in advance. Share this post Link to post Share on other sites
freeflashclocks 0 Report post Posted June 15, 2009 The best option for you to insert date and time on your web site is for you to use a web calendar and a web flash clock. Of course you can insert a date and time script on your website, but with the flash clock fashion this days, everyone is getting a free flash clock on web sites that offer them for free, for example, i have a popular web site where i offer really professional and cool flash clocks for free, you can download and use on your web site or blog.My web site about flash clocks, in fact is a blog, you can find what you want there at no cost.If you want to insert a script in your web site to show date and time, well, you can search free scripts web sites for free date/time scripts programmed in php and javascript, but it is much more cool to use a flash clock, you decide however. Share this post Link to post Share on other sites
shadowx 0 Report post Posted June 15, 2009 http://uk3.php.net/manual/en/function.date.phpNice N Easy From the php site:<?php// set the default timezone to use. Available since PHP 5.1date_default_timezone_set('UTC');// Prints something like: Mondayecho date("l");// Prints something like: Monday 8th of August 2005 03:12:46 PMecho date('l jS \of F Y h:i:s A');// Prints: July 1, 2000 is on a Saturdayecho "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));/* use the constants in the format parameter */// prints something like: Mon, 15 Aug 2005 15:12:46 UTCecho date(DATE_RFC822);// prints something like: 2000-07-01T00:00:00+00:00echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));?> Share this post Link to post Share on other sites
contactskn 2 Report post Posted June 15, 2009 Dear friends thank you very much for the suggestions but I would basically want to show the date and time in Hindi using unicode fonts is it possible please help me friends. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted June 15, 2009 What character set is defined for your page? Is it UTF-8 or Hindi? Share this post Link to post Share on other sites
Unparallelogram 0 Report post Posted June 19, 2009 I'm not sure about the details, but php lets you set locales and then format things in such the locale. You should first call setlocale() to tell php what language to use for its outputs, including date formatting, then call strftime(), which gives a formatted time string. See for details: http://uk3.php.net/manual/en/function.setlocale.php http://uk3.php.net/manual/en/function.strftime.php Share this post Link to post Share on other sites
contactskn 2 Report post Posted June 19, 2009 What character set is defined for your page? Is it UTF-8 or Hindi? Dear friend it is Hindi Share this post Link to post Share on other sites
iworld200 0 Report post Posted August 26, 2009 I'm not sure about the details, but php lets you set locales and then format things in such the locale. You should first call setlocale() to tell php what language to use for its outputs, including date formatting, then call strftime(), which gives a formatted time string. See for details:http://uk3.php.net/manual/en/function.setlocale.phphttp://uk3.php.net/manual/en/function.strftime.php in php is it possible to display the servers date instead of the systems default date in local language? Share this post Link to post Share on other sites