Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit f751b32

Browse files
authored
Merge pull request #293 from xwp/bugfix/safari-get-current-time
Fix broken getCurrentTime() method in Safari
2 parents e13488d + f2c26c1 commit f751b32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/customize-posts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
component.getCurrentTime = function getCurrentTime() {
534534
var currentDate, currentTimestamp, timestampDifferential;
535535
currentTimestamp = ( new Date() ).valueOf();
536-
currentDate = new Date( component.data.initialServerDate );
536+
currentDate = new Date( component.data.initialServerDate.replace( ' ', 'T' ) );
537537
timestampDifferential = currentTimestamp - component.data.initialClientTimestamp;
538538
timestampDifferential += component.data.initialClientTimestamp - component.data.initialServerTimestamp;
539539
currentDate.setTime( currentDate.getTime() + timestampDifferential );

0 commit comments

Comments
 (0)