Snazzah / SublimeDiscordRP

📄 Discord rich presence for Sublime Text
MIT License
131 stars 35 forks source link

Time elapsed counter inaccurate. #34

Closed SteelT1 closed 3 years ago

SteelT1 commented 5 years ago

Right after saving the file, it will show over 3 hours has elapsed on the profile.

FichteFoll commented 5 years ago

Currently, the time elapsed counter points at the time you opened Sublime Text.

Would you suggest to base the time on when you started working on the current project (and whether that should be remembered when you switch) or when you opened the current file? I could make it configurable, but the point is that it's hard to make out a certain point in time you would want to display in discord.

SteelT1 commented 5 years ago

I think it should be based on the former.

michaelowens commented 5 years ago

It seems like it currently does not respect timezones resulting in incorrect times, thus for me it starts counting from 14 hours.

I fixed it by changing the start_time line to: start_time = mktime(time.localtime())

Tested on both Windows 10 and MacOS Mojave.

datsdev commented 5 years ago

@michaelowens This fix worked after adding;

Below import time add from time import mktime

Also a fix by @michaelowens

FichteFoll commented 5 years ago

The original issue hasn't been addressed.

TorchedSammy commented 3 years ago

what would be the reason for this still being open?