Damn, I blame variable names. There are two variables in minecraft for getting world time, one is time of day, other is time of world. But for some stupid reason in code first one is named "total world time" and second is named just "world time". Of course, I chose the "total world time"...