phaselden / FlipIt

Flip Clock screensaver
Creative Commons Zero v1.0 Universal
1.08k stars 126 forks source link

Feature request: Manually add city and time zone #11

Closed explor202 closed 3 years ago

explor202 commented 3 years ago

I'd like to see an option to manually add a city and it's time zone info. I've changed my setup to increments of 2 hours, but since there is no city 22 hours ahead of me, I'd like to add my own so I can have an even amount of cities displayed. And yes, I have a fictional city already in mind : )

phaselden commented 3 years ago

Thanks for the request @explor202.

I haven't come up with a good solution to this yet that doesn't complicate the UI in some way. What timezone are you in or what timezone is 22 hours ahead of you?

explor202 commented 3 years ago

Thanks for the update. I'm in the Central time zone and could not find anything 22 hours ahead of me. I used this site to search: https://www.timeanddate.com/time/difference/usa/chicago

explor202 commented 3 years ago

Could you add a confirmation message when adding a city/time zone that's not in the DB "Add as custom?" and store that in an .ini or similar file? Maybe for time zone, since in my case one that's 22 hours ahead doesn't exist, I would need to select an existing time from one of my current cities, then add how many hours ahead the custom city would be. This way the UI shouldn't be affected as the same text field would be used.

phaselden commented 3 years ago

One thing you could do is look through the following file in this project to find the right timezone: src/FlipIt/res/TimeZoneCities.txt. It contains all the timezones and cities shown in FliptIt. The format of each line in that file is: <TimeZone ID>=<list of cities in that zone that Flipit displays> Don't bother editing this file (unless you are going to rebuild the app) as it will make no difference to the installed app.

Then add an entry to your settings.ini file manually. Your settings file is in the following place on your machine: C:\Users\\AppData\Local\FlipIt\Settings.ini. There will be a section something like [Screen DISPLAY1 Locations] for your screen that is showing your selected cities, and you can add new line under that. A "city" entry in the ini file has the format: <whatever name you desire>=<TimeZone ID>

phaselden commented 3 years ago

Oh, just read your last comment @explor202. I didn't realise you wanted to add a non-existent timezone. Hmmm, that won't work.

I think Central is UTC-6, so adding 22 hours to that would be UTC+16 and I very much doubt that is a thing.

explor202 commented 3 years ago

Okay, how about an option to edit the time of an existing city, similar to how we can edit the name? As long as the time entered could be synced with the other times displayed, that might be a viable option. If not, that's fine and I certainly appreciate your time spent looking into this.

phaselden commented 3 years ago

I have to admit that I don't really understand what you are trying to achieve here. Unless it is something that is relevant to others, I am hesitant to spend any time on it. You are always welcome to fork the project and make the changes you want though.

explor202 commented 3 years ago

I was just looking to have an even number of cities and times, in 2 hour increments (I don't like odd numbers). I understand not wanting to spend time on something that's not relevant to others, so I'll close this request. BTW, I'm a QA tester by trade, not a programmer. While I could fork this project, I wouldn't know where to start to make the change I'd like.