react-kronos
react-kronos copied to clipboard
Issue with timezones
Not sure why I'm having this issue. I receive a utc time as well as offset from the server. I format the time for the kronos timepicker with moment js and the timezone offset I receive from the server. Once I change the date the moment object is recreated (or cloned) and now has an est zone associated with the time stamp. I then need to convert the time to utc seconds to update the time on the server, but the conversion back does not seem to be working.
I think I'm understanding what is happening. Would you mind providing the surrounding code so that it can be further investigated? I'm not sure what would be causing this.
@dubert sure! here is a gist. https://gist.github.com/eamonpenland/cc998cf5cba1378e8b37dac5ec61f64d
this.props.changeStopTime triggers a redux action and in my reducer I have currently solved this by converting the kronos time to seconds and subtracting the time offset from est. Then I add the offset back to the time.