Skip to content
This repository was archived by the owner on May 8, 2018. It is now read-only.

Commit 0f1caa0

Browse files
committed
The problem was actually related to ISO 8601 and Safari #87
1 parent d67a3c7 commit 0f1caa0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/js/talks/schedule.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ function createBody(items)
192192

193193
function getItemTime(timeString)
194194
{
195-
var time = (new Date(timeString));
195+
var time = (new Date(timeString)).toLocaleTimeString();
196196

197-
hours = time.getHours();
198-
minutes = time.getMinutes();
197+
time = time.replace(/\u200E/g, '');
198+
time = time.replace(/^([^\d]*\d{1,2}:\d{1,2}):\d{1,2}([^\d]*)$/, '$1$2');
199199

200-
return hours+":"+minutes;
200+
return time;
201201
}
202202

203203
function getItemsColumns(current, items)

src/PHPSC/Conference/Domain/Entity/ScheduledItem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function jsonSerialize()
182182
$data = array(
183183
'id' => $this->getId(),
184184
'label' => $this->getLabel(),
185-
'startTime' => $this->getStartTime()->format(DateTime::ISO8601),
185+
'startTime' => $this->getStartTime()->format(DateTime::W3C),
186186
'room' => null,
187187
'talk' => null
188188
);

0 commit comments

Comments
 (0)