wakatime / jetbrains-wakatime

IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, Goland, Rider, & WebStorm plugin for quantifying your coding.
https://wakatime.com/intellij-idea
BSD 3-Clause "New" or "Revised" License
1.12k stars 162 forks source link

Wakatime stops working if system time was changed. #280

Closed Ketchp closed 2 months ago

Ketchp commented 2 months ago

As part of my secure-code university class I needed to change system time to future. I get that wakatime won't track this as this is unusual situation, but wakatime stopped working even after resetting time back to normal. By stopped working I mean showing 0 sec in plugin and in dashboard.

Wakatime log contains messages: {"caller":"pkg/api/api.go:103","file":"/home/stefan/FIT/BEK/lab07/change_time.c","func":"api.isLocalIPv6","level":"warning","message":"failed dialing to detect default local ip address: dial udp 143.244.210.202:80: connect: network is unreachable","now":"2022-02-12T04:36:34+01:00","os/arch":"linux/amd64","plugin":"clion/2023.3.4 clion-wakatime/14.3.13","time":1713109967.103,"version":"v1.90.0"}

wakatime-internal.cfg contained date from year 2027, probably from time I change my system time.

Deleting wakatime-internal.cfg and restarting IDE fixed the issue, and even retrospectively updated coding time for past two days.

I attach wakatime.log file. From names of files, I think issue started somewhere around line 400, but I can't be certain.

gandarez commented 2 months ago

Changing computer time to future is an exception and extremely rare, which may cause strange behaviors in other softwares too. Closing for now as it's not a real bug.