Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert table with dynamic time data to be viewable as a web page online?

Posted on 2014-11-17
6
Medium Priority
?
102 Views
Last Modified: 2014-11-20
I have a table with dynamically changing time data.  Each time the sheet is refreshed, the correct time for each time zone is shown.  I need to convert that so that it shows up online.
Countries.xlsx
0
Comment
Question by:frugalmule
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Assisted Solution

by:Brian Tao
Brian Tao earned 501 total points
ID: 40447714
Why don't you just use a page that's already on the Internet? like http://www.timeanddate.com/worldclock/full.html
0
 

Author Comment

by:frugalmule
ID: 40447729
I do not know how to combine it with the data I already have in the table.  I need all the data in the table, not just the times.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 999 total points
ID: 40447817
You can set the time according to a locale with date_default_timezone_set().  Please see the first demonstration script in this article.
http://iconoun.com/demo/temp_frugalmule.php

<?php // demo/temp_frugalmule.php
error_reporting(E_ALL);
echo '<pre>';

// TIMEZONES AROUND THE GLOBE
$locations
= array
( 'Pacific/Auckland'
, 'Australia/Sydney'
, 'Australia/Perth'
, 'Asia/Tokyo'
, 'Asia/Calcutta'
, 'Asia/Tel_Aviv'
, 'Africa/Cairo'
, 'Europe/Rome'
, 'Europe/London'
, 'Atlantic/Bermuda'
, 'America/Chicago'
, 'America/Anchorage'
, 'Pacific/Honolulu'
, 'UTC'
)
;
// ITERATE OVER THE TIMEZONES
foreach ($locations as $location)
{
    // SET THE TIMEZONE FOR DISPLAY
    date_default_timezone_set($location);

    // SHOW THE LOCATION AND THE CURRENT DATE / TIME
    echo PHP_EOL . str_pad($location, 24, ' ');
    echo date('r');

    // SHOW THE NUMBER OF SECONDS SINCE THE EPOCH, RECOMPUTED IN EACH TIMEZONE
    echo ' ' . number_format( time() );
}

Open in new window

0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 

Author Comment

by:frugalmule
ID: 40447841
That is only showing the syntax > http://tedpenner.com/countries/
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 999 total points
ID: 40447850
It's a standalone script, meant to be used as a teaching example.  It's not designed to be embedded into a blog.  You can see it in action on my server, here:
http://iconoun.com/demo/temp_frugalmule.php
0
 

Author Closing Comment

by:frugalmule
ID: 40455780
Thanks
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question