You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Realized that the countdown is relative to the time zone of the client, rather than a standardized time(e.g. UTC or Epoch). For anyone looking for a quick workaround to getting the countdown to sync up across time zones, here's my hacky solution:
let startTimeEpoch = 1593540000;
let d = new Date(0);
d.setUTCSeconds(startTimeEpoch);
let month = d.getMonth() + 1;
let day = d.getDate();
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
this.deadlineLocal =
d.getFullYear() + "-" + month + "-" + day + " " + d.getHours() + ":00:00";
Kinda pressed on time at the moment, but could be nifty to add an optional prop to the component that accepts an Epoch timestamp and converts it based on the client's location 😊
The text was updated successfully, but these errors were encountered:
Thank you for making this package!
Realized that the countdown is relative to the time zone of the client, rather than a standardized time(e.g. UTC or Epoch). For anyone looking for a quick workaround to getting the countdown to sync up across time zones, here's my hacky solution:
Kinda pressed on time at the moment, but could be nifty to add an optional prop to the component that accepts an Epoch timestamp and converts it based on the client's location 😊
The text was updated successfully, but these errors were encountered: