fix bug where time offset was substracted twice, giving false results