Discussions » Creation Requests

Convert Date and Time from UTC to local time

§
Posted: 2014-10-12
Edited: 2014-10-12

Convert Date and Time from UTC to local time

I'm a Republic Wireless customer, and the service is great. However, there are a couple annoyances on the website. The worst is that all date and time markers in the call log are displayed in UTC, and there is no way to change that. I was wondering if somebody could write a script that converts the date and time pairs in each row to the user's local timezone. Thanks.

The html looks like this:

<div class="row">
<div id="cdrs_list" class="content col-md-12">
<div>
<table class="table table-bordered table-striped table-condensed">
<thead>
    <tr><th>Date</th>
    <th>Start time</th>
    <th>Direction</th>
    <th>From/To</th>
    <th>Duration</th>
    <th>Type</th>
    <th>Network</th>
</tr></thead>
<tbody>
<tr><td>10/01/2014</td>
<td>00:15:16 (UTC)</td>
<td>Inbound</td>
<td>(555) 555-5555</td>
<td class="data"></td>
<td>call</td>
<td>Cellular</td>
</tr>
<tr><td>10/01/2014</td>
<td>12:54:34 (UTC)</td>
<td>Outbound</td>
<td>(555) 555-5555</td>
<td class="data">00:00:50</td>
<td>call</td>
<td>Wi-Fi</td>
</tr>

...

<tr><td>10/02/2014</td>
<td>16:11:43 (UTC)</td>
<td>Inbound</td>
<td>(555) 555-5555</td>
<td class="data"></td>
<td>call</td>
<td>Cellular</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

PS — If it helps, this is a related script: http://stackapps.com/questions/2528/display-absolute-timestamps-in-local-time

Post reply

Sign in to post a reply.