cherry2016 Posted June 27, 2017 Share Posted June 27, 2017 Hi. I am new here and I don't know much about php.. But I'm trying to put digital clock to header. I'm using Wordpress. I found these iframe codes which look like easy to put a clock for me. <iframe src="http://free.timeanddate.com/clock/i5s4jcs4/n671/ts1" frameborder="0" width="94" height="18"></iframe> <iframe src="http://free.timeanddate.com/clock/i5s4jcs4/n9/ts1" frameborder="0" width="94" height="18"></iframe> I have to put Japan's time and Mexico's time. Is it possible to put these codes to header.php? If so, could you please teach me how? Thank you so much. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 27, 2017 Share Posted June 27, 2017 Read the forum rules. We're not here to play the guess-what-my-problem-is game. If you want help, then it's your job to provide all relevant information. This includes a problem description (What went wrong? What do you not understand?), the code, error messages etc. Quote Link to comment Share on other sites More sharing options...
cherry2016 Posted June 27, 2017 Author Share Posted June 27, 2017 Sorry.. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 27, 2017 Share Posted June 27, 2017 So? Where is the information? Or are you no longer interested? Quote Link to comment Share on other sites More sharing options...
cherry2016 Posted June 27, 2017 Author Share Posted June 27, 2017 I'm still working on the all information and understanding the rules. Quote Link to comment Share on other sites More sharing options...
gizmola Posted June 27, 2017 Share Posted June 27, 2017 Please --- frames... just don't. PHP has some great date/time/timezone handling. See this simple program as an example: This code or something similar could easily go into a header: $tz_mexico = new DateTimeZone('America/Mexico_City'); $tz_japan = new DateTimeZone('Asia/Tokyo'); // Time Now $ts = new DateTime(); $ts->setTimezone($tz_mexico); echo "Mexico:" . $ts->format('g:i a') . ' '; $ts->setTimezone($tz_japan); echo "Japan:" . $ts->format('g:i a'); See it in action! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.