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

Commit

Permalink
Merge pull request #293 from xwp/bugfix/safari-get-current-time
Browse files Browse the repository at this point in the history
Fix broken getCurrentTime() method in Safari
  • Loading branch information
westonruter authored Sep 23, 2016
2 parents e13488d + f2c26c1 commit f751b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/customize-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
component.getCurrentTime = function getCurrentTime() {
var currentDate, currentTimestamp, timestampDifferential;
currentTimestamp = ( new Date() ).valueOf();
currentDate = new Date( component.data.initialServerDate );
currentDate = new Date( component.data.initialServerDate.replace( ' ', 'T' ) );
timestampDifferential = currentTimestamp - component.data.initialClientTimestamp;
timestampDifferential += component.data.initialClientTimestamp - component.data.initialServerTimestamp;
currentDate.setTime( currentDate.getTime() + timestampDifferential );
Expand Down

0 comments on commit f751b32

Please sign in to comment.