fixed compilation warnings due to local-time API changes
fixed merge conflicts